/* SOF-RACER 2.0 — portal styles, built on GovSignals tokens */
@import url("./tokens.css");
* {
  box-sizing: border-box;
}
:root {
  --v2-dark-bg: #0a0d11;
  --v2-dark-panel: #0e1217;
  --v2-dark-fg: #f4f1ed;
  --v2-dark-sub: rgba(244, 241, 237, 0.58);
  --v2-dark-hair: rgba(244, 241, 237, 0.12);
  --v2-dark-hair-soft: rgba(244, 241, 237, 0.07);
  --v2-accent: #d88c56;
  --v2-light-hair: rgba(17, 21, 25, 0.12);
  --v2-light-hair-soft: rgba(17, 21, 25, 0.07);
  /* Shared page shell — keep every portal route on the same content width. */
  --v2-page-max: 1240px;
  --v2-page-gutter: 64px;
}
.v2-container {
  max-width: var(--v2-page-max);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.v2-page-gutter {
  padding-left: var(--v2-page-gutter);
  padding-right: var(--v2-page-gutter);
}
.v2-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
}
.v2-mono-xs {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 9px;
}
.v2-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
}
a {
  text-decoration: none;
}
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 22px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  white-space: nowrap;
  border-radius: 2px;
  transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
  letter-spacing: 0.01em;
}
.v2-btn.lg {
  height: 52px;
  padding: 0 28px;
  font-size: 14px;
}
.v2-btn.sm {
  height: 36px;
  padding: 0 16px;
  font-size: 12.5px;
}
.v2-btn.paper {
  background: #f4f1ed;
  color: #111519;
  border-color: #f4f1ed;
}
.v2-btn.paper:hover {
  background: #fff;
}
.v2-btn.accent {
  background: var(--v2-accent);
  color: #111519;
  border-color: var(--v2-accent);
}
.v2-btn.accent:hover {
  filter: brightness(1.08);
}
.v2-btn.ink {
  background: var(--ink-900);
  color: #f4f1ed;
  border-color: var(--ink-900);
}
.v2-btn.ink:hover {
  background: #000;
}
.v2-btn.ghost-d {
  background: transparent;
  color: #f4f1ed;
  border-color: rgba(244, 241, 237, 0.28);
}
.v2-btn.ghost-d:hover {
  border-color: rgba(244, 241, 237, 0.6);
}
.v2-btn.ghost-l {
  background: transparent;
  color: var(--ink-900);
  border-color: rgba(17, 21, 25, 0.25);
}
.v2-btn.ghost-l:hover {
  border-color: var(--ink-900);
}
.v2-btn.bare-d {
  background: transparent;
  color: rgba(244, 241, 237, 0.75);
  border: 0;
}
.v2-btn.bare-d:hover {
  color: #f4f1ed;
}
.v2-btn.bare-l {
  background: transparent;
  color: var(--ink-700);
  border: 0;
}
.v2-btn.bare-l:hover {
  color: var(--ink-900);
}
.v2-arrow::after {
  content: "→";
  font-family: var(--font-mono);
}
.v2-drow {
  display: grid;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background 180ms;
  text-decoration: none;
}
.v2-drow:hover {
  background: rgba(244, 241, 237, 0.045);
}
.v2-lrow {
  display: grid;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: background 180ms;
  text-decoration: none;
}
.v2-lrow:hover {
  background: rgba(119, 92, 73, 0.06);
}
.v2-aoi {
  transition: all 200ms;
}
.v2-aoi:hover {
  background: rgba(216, 140, 86, 0.06);
}
.v2-aoi:hover .v2-aoi-num {
  color: var(--v2-accent);
}
.v2-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 99px;
}
.v2-dot.open {
  background: var(--sage-300);
  box-shadow: 0 0 0 3px rgba(130, 193, 172, 0.15);
}
.v2-dot.open-l {
  background: var(--sage-500);
  box-shadow: 0 0 0 3px rgba(94, 138, 134, 0.18);
}
.v2-tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
}
.v2-tlink.d {
  color: #f4f1ed;
}
.v2-tlink.d:hover {
  color: var(--v2-accent);
}
.v2-tlink.l {
  color: var(--ink-900);
}
.v2-tlink.l:hover {
  color: var(--clay-700);
}
.v2-kb {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.v2-kb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 70% 35%;
  animation: v2-kb-drift 34s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate;
}
@keyframes v2-kb-drift {
  from {
    transform: scale(1.12) translateX(1.2%);
  }
  to {
    transform: scale(1.01);
  }
}
.v2-rise {
  opacity: 0;
  transform: translateY(26px);
  animation: v2-rise 1s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}
@keyframes v2-rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes v2-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.v2-marquee {
  display: flex;
  gap: 56px;
  animation: v2-marquee 70s linear infinite;
  white-space: nowrap;
}
:focus-visible {
  outline: 2px solid var(--clay-700);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .v2-kb img,
  .v2-rise,
  .v2-marquee {
    animation: none !important;
  }
  .v2-rise {
    opacity: 1 !important;
    transform: none !important;
  }
}
.v2-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-rail-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
  font-size: 13.5px;
  border: 0;
  border-bottom: 1px solid var(--v2-light-hair);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink-900);
}
.v2-rail-step:disabled {
  cursor: default;
  opacity: 0.6;
}
.v2-rail-dot {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  border: 1.5px solid var(--v2-light-hair);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  flex-shrink: 0;
  transition: all 200ms;
}
.v2-rail-step.done .v2-rail-dot {
  background: var(--sage-700);
  border-color: var(--sage-700);
  color: #fff;
}
.v2-rail-step.now .v2-rail-dot {
  border-color: var(--ink-900);
  color: var(--ink-900);
  font-weight: 600;
}
.v2-rail-step.todo {
  color: var(--ink-700);
  opacity: 0.6;
}
.v2-field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-input {
  height: 46px;
  padding: 0 14px;
  font-size: 14.5px;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--paper-50);
  border: 1px solid var(--v2-light-hair);
  border-radius: 2px;
  outline: none;
  transition:
    border-color 150ms,
    box-shadow 150ms;
  width: 100%;
}
.v2-input:focus {
  border-color: var(--ink-900);
  box-shadow: 0 0 0 3px rgba(17, 21, 25, 0.08);
}
textarea.v2-input {
  height: auto;
  padding: 12px 14px;
  line-height: 1.6;
  resize: vertical;
}
.v2-faq {
  border-bottom: 1px solid var(--v2-light-hair);
}
.v2-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 4px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink-900);
}
.v2-faq summary::-webkit-details-marker {
  display: none;
}
.v2-faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--clay-900);
  transition: transform 200ms;
}
.v2-faq[open] summary::after {
  transform: rotate(45deg);
}
.v2-faq p {
  margin: 0 0 22px;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-700);
  max-width: 640px;
}
.v2-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.v2-pill.eval {
  background: rgba(216, 140, 86, 0.14);
  color: #8a4f26;
}
.v2-pill.sel {
  background: rgba(94, 138, 134, 0.16);
  color: var(--sage-700);
}
.v2-pill.rev {
  background: rgba(17, 21, 25, 0.07);
  color: var(--ink-700);
}
.v2-pill.win {
  background: rgba(94, 138, 134, 0.16);
  color: var(--sage-700);
}
.v2-pill.no {
  background: rgba(176, 72, 59, 0.12);
  color: #b0483b;
}

/* Pipeline bar: the five-segment progress rail on submissions and the
   two-step header on the submit wizard. Segment tone comes from
   submissionPipelineStage() in @govsignals/lib/solicitation-portal/payload. */
.v2-pipe {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}
.v2-pipe .st {
  padding-top: 12px;
  border-top: 3px solid rgba(17, 21, 25, 0.12);
}
.v2-pipe .st.done {
  border-top-color: var(--sage-700);
}
.v2-pipe .st.now {
  border-top-color: var(--v2-accent);
}
.v2-pipe .st.no {
  border-top-color: #b0483b;
}
.v2-pipe .st .k {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
}
.v2-pipe .st.todo .k {
  color: var(--ink-700);
  opacity: 0.65;
}
.v2-pipe .st .w {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink-700);
}
.v2-pipe .st .m {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentcolor;
}

/* Compact segment bar used in the dashboard's submission and award rows. */
.v2-seg {
  display: inline-flex;
  gap: 5px;
}
.v2-seg span {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(17, 21, 25, 0.12);
}
.v2-seg span.done {
  background: var(--sage-700);
}
.v2-seg span.now {
  background: var(--v2-accent);
}
.v2-seg span.no {
  background: #b0483b;
}

/* File rows and the drag-and-drop target on the submit wizard. */
.v2-file {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--v2-light-hair-soft);
}
.v2-file .ic {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  border: 1px solid var(--v2-light-hair);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--clay-900);
}
.v2-file .nm {
  font-size: 13.5px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.v2-file .mt {
  font-size: 11.5px;
  color: var(--ink-700);
}
.v2-drop {
  padding: 26px 20px;
  border: 1.5px dashed var(--clay-500);
  background: rgba(161, 125, 96, 0.05);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-700);
  cursor: pointer;
}
.v2-drop.over {
  background: rgba(161, 125, 96, 0.12);
  border-color: var(--clay-900);
}

/* Tag filter chips on /updates. */
.v2-filter {
  padding: 7px 15px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.v2-src {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clay-900);
  background: rgba(216, 140, 86, 0.12);
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 500;
}
.v2-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--paper-50);
  border: 1px solid var(--v2-light-hair);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 150ms,
    background 150ms;
}
.v2-chip:hover {
  border-color: var(--ink-900);
}
.v2-chip.on {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--paper-50);
}
.v2-scan-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--v2-light-hair-soft);
}
.v2-scan-line .ok {
  color: var(--sage-700);
  font-family: var(--font-mono);
  font-size: 12px;
}
.v2-spinner {
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--v2-light-hair);
  border-top-color: var(--clay-900);
  border-radius: 99px;
  animation: v2-spin 700ms linear infinite;
  flex-shrink: 0;
}
@keyframes v2-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .v2-spinner {
    animation: none;
  }
}
.v2-review-block {
  border-top: 1px solid var(--v2-light-hair);
  padding: 20px 0;
}
.v2-shell-dark {
  background: var(--v2-dark-bg);
  color: var(--v2-dark-fg);
  /* ScrollArea thumb — mirrors shadcn bg-border intent on dark surfaces. */
  --v2-scroll-thumb: rgba(244, 241, 237, 0.6);
  --v2-scroll-thumb-hover: rgba(244, 241, 237, 0.8);
}
.v2-shell-light {
  background: var(--paper-150);
  color: var(--ink-900);
  /* ScrollArea thumb — mirrors shadcn bg-border intent on light surfaces. */
  --v2-scroll-thumb: rgba(17, 21, 25, 0.28);
  --v2-scroll-thumb-hover: rgba(17, 21, 25, 0.42);
}

/* Site-wide ScrollArea shell — document never scrolls; overlay thumb does.
   Nav sits outside the scrollport so the thumb never runs through chrome. */
html.v2-portal-shell,
html.v2-portal-shell body {
  height: 100%;
  overflow: hidden;
}

html.v2-portal-shell body {
  margin: 0;
  display: flex;
  flex-direction: column;
}

html.v2-portal-shell .portal-scroll-shell-host {
  flex: 1;
  min-height: 0;
}

@media print {
  html.v2-portal-shell,
  html.v2-portal-shell body {
    height: auto;
    overflow: visible;
  }

  html.v2-portal-shell .portal-scroll-shell,
  html.v2-portal-shell .v2-scroll-area-viewport {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}
