@font-face {
  font-family: 'GovWatch Serif';
  src: url('/fonts/signoffs/govwatch-instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'GovWatch Inter';
  src: url('/fonts/signoffs/govwatch-inter.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* The live site's hero: a centred green serif over a centred search pill, on
   near-black with a faint dot grid. */
[data-signoff='govwatch'] {
  --gw-green: hsl(143 72% 30%);
  --gw-dot: rgb(0 0 0 / 0.08);
  --gw-glow: transparent;
  --gw-ground: transparent;
  --gw-field: rgb(255 255 255 / 0.92);
  --gw-edge: #e4e4e7;
  --gw-hint: #52525b;
  --b-font: 'GovWatch Serif', serif;
  --b-weight: 400;
  --b-tracking: -0.02em;
  --b-fit: 0.19;
  --b-crop: 12%;
  --b-align: center;
  --b-ink: var(--gw-green);
  --b-height: clamp(210px, 23vw, 330px);
  --b-height-m: 220px;
}
.dark [data-signoff='govwatch'] {
  --gw-green: hsl(143 72% 50%);
  --gw-dot: rgb(255 255 255 / 0.07);
  --gw-glow: hsl(143 72% 50% / 0.08);
  --gw-ground: hsl(225 15% 7%);
  --gw-field: hsl(222 30% 11% / 0.92);
  --gw-edge: hsl(143 72% 50% / 0.28);
  --gw-hint: hsl(215 20% 75%);
}

[data-signoff='govwatch'] .story-signoff-scene {
  background:
    radial-gradient(42% 70% at 50% 110%, var(--gw-glow), transparent 70%),
    radial-gradient(circle at center, var(--gw-dot) 0.7px, transparent 0.9px)
      50% 0 / 24px 24px,
    var(--gw-ground);
  /* Eased, so the near-black surfaces out of the page with no edge. */
  -webkit-mask-image: linear-gradient(
    transparent,
    rgb(0 0 0 / 0.05) 12%,
    rgb(0 0 0 / 0.18) 26%,
    rgb(0 0 0 / 0.4) 40%,
    rgb(0 0 0 / 0.66) 54%,
    rgb(0 0 0 / 0.88) 68%,
    #000 82%
  );
  mask-image: linear-gradient(
    transparent,
    rgb(0 0 0 / 0.05) 12%,
    rgb(0 0 0 / 0.18) 26%,
    rgb(0 0 0 / 0.4) 40%,
    rgb(0 0 0 / 0.66) 54%,
    rgb(0 0 0 / 0.88) 68%,
    #000 82%
  );
}

[data-signoff='govwatch'] .story-signoff-name {
  pointer-events: none;
}
[data-signoff='govwatch'] .gw-name {
  all: unset;
  pointer-events: auto;
  cursor: pointer;
  transition: text-shadow 0.4s;
}
.dark [data-signoff='govwatch'] .gw-name {
  text-shadow: 0 0 0.025em hsl(143 72% 50% / 0.22);
}
[data-signoff='govwatch'] .gw-name:hover,
[data-signoff='govwatch'] .gw-name:focus-visible {
  text-shadow: 0 0 0.04em hsl(143 72% 45% / 0.3);
}

/* The search pill, which types out what defense.gov saw. Centred over the
   name, as on the live site, and its bottom sits a fixed gap above the
   name's ascenders (about 0.74em of it shows). */
[data-signoff='govwatch'] .gw-field {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(100cqw * var(--b-fit) * 0.74 + 18px);
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(520px, calc(100% - 2 * var(--f-gutter)));
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--gw-edge);
  border-radius: 999px;
  background: var(--gw-field);
  box-shadow: 0 6px 24px -12px hsl(143 72% 30% / 0.35);
  color: var(--gw-hint);
  font:
    400 14px/1 'GovWatch Inter',
    system-ui,
    sans-serif;
  opacity: 0;
  translate: -50% 6px;
  transition:
    opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    translate 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
}
[data-signoff='govwatch'] .gw-field[data-on] {
  opacity: 1;
  translate: -50% 0;
}
[data-signoff='govwatch'] .gw-field svg {
  flex: none;
  width: 15px;
  height: 15px;
  stroke: var(--gw-green);
}
[data-signoff='govwatch'] .gw-type {
  overflow: hidden;
  white-space: nowrap;
  scrollbar-width: none;
}
[data-signoff='govwatch'] .gw-field[data-hold] .gw-type {
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 calc(100% - 32px),
    transparent
  );
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
[data-signoff='govwatch'] .gw-type b {
  font-weight: 500;
  color: var(--gw-green);
}
[data-signoff='govwatch'] .gw-type::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--gw-green);
  animation: gw-caret 1s steps(1) infinite;
}
@keyframes gw-caret {
  50% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  [data-signoff='govwatch'] {
    --b-fit: 0.25;
  }
  [data-signoff='govwatch'] .gw-field {
    height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }
}
