/* =========================================================
   STORM — TERMINOLOGY (tech page)
   -----------------------------------------------------------
   Loads ON TOP of base-web-style.css + tech-dark-teal-skin.css.
   The look is the skin's; this file puts it back into the OLD
   page's layout, measured off it at 1440 / 1024 / 768:

     1. the search field's width and the gap under it
     2. the term "wall" — big uppercase Oswald words flowing across
        the page, grouped under a heading per topic, each one a
        button that opens its definition
     3. the popup's content: paragraphs, indented sub-points, and
        the picture / GIF / video / YouTube frame

   The topic bar is base's .spi-subnav, the search is .spi-input,
   the popup is base's .spi-modal.is-content driven by the shared
   spi-modal.js, and the email button is .btn.default. No tokens
   are redefined.
   ========================================================= */

/* Jumping to a topic scrolls instead of snapping, as the old
   page did — and not at all for anyone who asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ---------------------------------------------------------
   1. SEARCH
--------------------------------------------------------- */
.tm-search {
  margin-bottom: 56px;
}

.tm-search .spi-eyebrow {
  display: block;
  margin-bottom: 8px;
}

/* Two classes: the store theme's .std p { margin: 1em 0 } is
   (0,1,1) and would otherwise win. */
.tm-search .tm-count {
  margin: 12px 0 0;
}

/* ---------------------------------------------------------
   2. THE WALL
   Old page: 64px at 1440, 48px at 1024, 32px on a phone, the
   steps between them done with media queries. One clamp()
   covers every width between. Terms sit 64px apart on a
   desktop; the gap eases down with the screen.
--------------------------------------------------------- */
.tm-sections {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.tm-section[hidden],
.tm-wall > li[hidden],
.tm-empty[hidden] {
  display: none;
}

.tm-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(24px, 4.4vw, 64px);
  margin: 24px 0 0;
}

/* A <button> — it opens something, so it is one — dressed as the
   old page's headline-sized word. The store theme styles <button>,
   so the face is stated in full rather than inherited. */
.tm-term {
  margin: 0;
  padding: 6px 0;
  min-height: 44px;
  border: 0;
  background: none;
  font-family: var(--spi-font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
  color: var(--spi-text-muted);
  cursor: pointer;
  transition: var(--spi-ease);
}

.tm-term:hover {
  color: var(--spi-accent);
}

.tm-term:focus-visible {
  outline: 2px solid var(--spi-accent);
  outline-offset: 4px;
  border-radius: var(--spi-radius-sm);
}

.tm-empty {
  padding: 56px 0;
  text-align: center;
}

/* ---------------------------------------------------------
   3. THE POPUP'S CONTENT
   The overlay, panel, close button, fade and focus handling are
   base's and spi-modal.js's. Below is only what goes inside.
--------------------------------------------------------- */
.spi-modal.is-content .tm-def {
  margin: 0;
  text-align: left;
}

.spi-modal.is-content .tm-def + .tm-def {
  margin-top: 12px;
}

/* "a. ", "b. " ... lines in a definition sit under their point */
.spi-modal.is-content .tm-def.is-sub {
  margin-left: 24px;
}

/* A picture, GIF or hosted video, never wider than the panel */
.spi-modal.is-content .tm-media {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--spi-radius-md);
}
