/* Shared page-chrome components: nav bar, cards, badges, buttons, table.
   Depends on tokens.css being loaded first. */

.vec-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 76px;
  border-bottom: 1px solid var(--vec-border);
  flex-shrink: 0;
}

.vec-nav-logo {
  font-family: var(--vec-font-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--vec-text-primary);
}

.vec-nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.vec-nav-link {
  font-family: var(--vec-font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--vec-text-muted);
}

.vec-nav-link:hover {
  color: var(--vec-text-primary);
}

.vec-nav-link.vec-nav-link--active {
  font-weight: 700;
  color: var(--vec-text-primary);
}

/* Every page with this nav is behind the login, so it offers Log out (a form post). */
.vec-signout-form { display: contents; }

.vec-signin {
  background: none;
  cursor: pointer;
  font-family: var(--vec-font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--vec-text-primary);
  padding: 10px 18px;
  border: 1.5px solid var(--vec-text-primary);
  border-radius: var(--vec-radius-sm);
}

.vec-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.vec-content {
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.vec-eyebrow {
  font-family: var(--vec-font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--vec-accent-green);
}

.vec-h1 {
  margin: 0;
  font-family: var(--vec-font-sans);
  font-size: 32px;
  font-weight: 700;
  color: var(--vec-text-primary);
  line-height: 1.2;
}

.vec-lede {
  font-family: var(--vec-font-sans);
  font-size: 15px;
  color: var(--vec-text-secondary);
  line-height: 1.6;
  max-width: 820px;
}

.vec-section-label {
  font-family: var(--vec-font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--vec-text-primary);
}

.vec-card {
  border: 1.5px solid var(--vec-border);
  border-radius: var(--vec-radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease;
}

.vec-card:hover {
  border-color: var(--vec-text-primary);
}

.vec-badge {
  font-family: var(--vec-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--vec-radius-sm);
  padding: 3px 7px;
  border: 1px solid currentColor;
  display: inline-block;
}

.vec-badge--established { color: var(--vec-band-excellent); border-color: var(--vec-accent-green); }
.vec-badge--indicative { color: var(--vec-band-good); border-color: var(--vec-accent-amber); }

.vec-table {
  border: 1.5px solid var(--vec-border);
  border-radius: var(--vec-radius-md);
  overflow: hidden;
}

.vec-table-row {
  display: grid;
  border-bottom: 1px solid var(--vec-border);
}

.vec-table-row:last-child {
  border-bottom: none;
}

.vec-table-row--head {
  background: var(--vec-bg-subtle);
  border-bottom: 1.5px solid var(--vec-border);
}

.vec-table-cell {
  padding: 14px 18px;
  font-family: var(--vec-font-sans);
  font-size: 13px;
  color: var(--vec-text-primary);
}

.vec-table-cell--head {
  font-family: var(--vec-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--vec-text-muted);
}

.vec-table-cell--mono {
  font-family: var(--vec-font-mono);
}

.vec-table-cell--muted {
  color: var(--vec-text-faint);
}

.vec-btn {
  font-family: var(--vec-font-mono);
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--vec-radius-sm);
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  white-space: nowrap;
}

.vec-btn--primary {
  background: var(--vec-accent-green);
  color: var(--vec-ink-on-dark);
}

.vec-btn--primary:hover {
  background: var(--vec-accent-green-hover);
}

.vec-btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.vec-link-arrow {
  font-family: var(--vec-font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--vec-accent-indigo);
  align-self: flex-start;
}

.vec-panel {
  background: var(--vec-bg-subtle);
  border-radius: var(--vec-radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vec-panel-outline {
  border: 1.5px solid var(--vec-border);
  border-radius: var(--vec-radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.vec-skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.vec-skill-download {
  font-family: var(--vec-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--vec-accent-indigo);
  margin-top: auto;
}

.vec-skill-download:hover {
  color: var(--vec-accent-green);
}

.vec-capability-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vec-capability-legend-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--vec-font-sans);
  font-size: 13px;
  color: var(--vec-text-secondary);
}

.vec-capability-legend-band {
  font-family: var(--vec-font-mono);
  font-size: 12px;
  font-weight: 700;
  min-width: 90px;
}

/* --- Responsive: tablet and phone widths --- */

.vec-table-scroll {
  overflow-x: auto;
}

@media (max-width: 900px) {
  .vec-content {
    padding: 32px 24px;
    gap: 28px;
  }

  .vec-nav {
    padding: 0 20px;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .vec-nav-links {
    gap: 18px;
    flex-wrap: wrap;
  }

  .vec-skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vec-tier-row,
  .vec-methodology-row {
    flex-direction: column !important;
  }

  .vec-cta-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px;
  }

  .vec-table {
    overflow-x: auto;
  }

  .vec-table-row {
    min-width: 640px;
  }
}

@media (max-width: 600px) {
  .vec-content {
    padding: 24px 16px;
  }

  .vec-h1 {
    font-size: 26px;
  }

  .vec-skills-grid {
    grid-template-columns: 1fr;
  }

  .vec-nav-link {
    font-size: 12px;
  }

  .vec-nav-logo {
    font-size: 17px;
  }

  .vec-signin {
    padding: 7px 12px;
    font-size: 11px;
  }
}

/* --- Calculator: period toggles, worked-calculation tables, tier cards --- */

.vec-period-toggle { display: flex; border: 1.5px solid var(--vec-ink); border-radius: var(--vec-radius-sm); overflow: hidden; flex-shrink: 0; }
.vec-period-toggle button {
  font-family: var(--vec-font-mono); font-size: 12px; font-weight: 700; border: none; background: var(--vec-bg);
  color: var(--vec-text-muted); padding: 0 12px; cursor: pointer; min-height: 44px;
}
.vec-period-toggle button.vec-period-toggle--active { background: var(--vec-ink); color: var(--vec-ink-on-dark); }

.vec-field { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vec-field label { font-family: var(--vec-font-sans); font-size: 13px; font-weight: 600; }
.vec-field-row { display: flex; gap: 8px; }
.vec-field-row .vec-input { flex-grow: 1; min-width: 0; }
.vec-input {
  font-family: var(--vec-font-mono); font-size: 14px; padding: 12px 14px; border: 1.5px solid var(--vec-ink);
  border-radius: var(--vec-radius-sm); color: var(--vec-text-primary); background: var(--vec-bg);
}
.vec-input:focus { outline: none; border-color: var(--vec-accent-indigo); }
.vec-input--invalid, .vec-input--invalid:focus { border-color: var(--vec-accent-red); }
.vec-field-message { margin: 0; font-family: var(--vec-font-mono); font-size: 11px; color: var(--vec-text-faint); }
.vec-field-message--error { color: var(--vec-accent-red); }
.vec-session-message {
  margin: 0; padding: 12px 16px; border: 1.5px solid var(--vec-accent-red); border-radius: var(--vec-radius-lg);
  font-family: var(--vec-font-sans); font-size: 14px;
}
.vec-inputs-row { display: flex; gap: 16px; }

.vec-tier-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.vec-tier-card { border: 1.5px solid var(--vec-border); border-radius: var(--vec-radius-md); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.vec-tier-label { font-family: var(--vec-font-mono); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.vec-tier-value { font-family: var(--vec-font-mono); font-size: 26px; font-weight: 700; }
.vec-tier-caption { font-family: var(--vec-font-sans); font-size: 13px; color: var(--vec-text-muted); }

.vec-step-label { font-family: var(--vec-font-mono); font-size: 12px; font-weight: 700; color: var(--vec-accent-green); letter-spacing: 1px; text-transform: uppercase; }
.vec-step-title { font-family: var(--vec-font-sans); font-size: 17px; font-weight: 700; margin: 0; }
.vec-note { font-family: var(--vec-font-sans); font-size: 12px; color: var(--vec-text-faint); font-style: italic; line-height: 1.6; }
.vec-body { font-family: var(--vec-font-sans); font-size: 14px; color: var(--vec-text-secondary); line-height: 1.7; }

.vec-score-tile-value { font-family: var(--vec-font-mono); font-size: 28px; font-weight: 700; color: var(--vec-text-faint); }
.vec-score-rule { font-family: var(--vec-font-sans); font-size: 12px; color: var(--vec-text-muted); line-height: 1.6; }

@media (max-width: 900px) {
  .vec-tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vec-inputs-row { flex-direction: column; }
}
@media (max-width: 600px) {
  .vec-tier-grid { grid-template-columns: 1fr; }
}

.vec-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .vec-capability-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { #vec-run-scan-btn { padding: 0 14px; } }

/* v2.1 Calculator additions (2026-10-27) */
.vec-step2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vec-period-control { display: flex; align-items: center; gap: 10px; font-family: var(--vec-font-sans); font-size: 13px; font-weight: 600; color: var(--vec-text-secondary); }
.vec-period-toggle--wide button { padding: 0 16px; }
.vec-score-tile-value[data-band="weak"] { color: var(--vec-band-weak); }
.vec-score-tile-value[data-band="good"] { color: var(--vec-band-good); }
.vec-score-tile-value[data-band="excellent"] { color: var(--vec-band-excellent); }
.vec-score-tile-value[data-state="unavailable"] { font-size: 16px; color: var(--vec-text-muted); }
.vec-score-tile-value[data-state="scanning"] { font-size: 16px; color: var(--vec-accent-indigo); animation: vec-pulse 1.4s ease-in-out infinite; }
@keyframes vec-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .vec-score-tile-value[data-state="scanning"] { animation: none; } }
.vec-distribution-row { display: flex; align-items: center; gap: 28px; }
.vec-distribution-score { background: var(--vec-bg-subtle); border-radius: var(--vec-radius-md); padding: 20px 24px; display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.vec-uplift-pct { font-family: var(--vec-font-mono); font-size: 14px; font-weight: 700; color: var(--vec-band-excellent); }
.vec-uplift-row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.vec-label-row { display: flex; align-items: center; gap: 12px; }
@media (max-width: 900px) {
  .vec-distribution-row { flex-direction: column; align-items: stretch; }
  .vec-distribution-score { min-width: 0; }
}
