/* Site-wide UX enhancements v1 */

/* Navigator is intentionally spacious on desktop. Keep this explicit instead
   of inheriting a full-width layout accidentally from another site mode. */
body.mode-navigator-active #main-content-k1 {
  max-width: none;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

#site-journey-hero {
  margin-bottom: 1.25rem;
  width: 100%;
}

/* First-session legal-information notice */
.site-legal-notice-card {
  max-height: min(90vh, 760px);
  overflow-y: auto;
  border-top: 4px solid var(--warn);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.32);
}

.site-legal-notice-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.55;
}

.site-legal-notice-list li::marker {
  color: var(--warn);
}

.site-legal-notice-emergency {
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--warn);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--surface2) 86%, #fef3c7 14%);
  color: var(--text);
  line-height: 1.5;
}

/* Lightweight, skippable navigation tour */
.site-tour-highlight {
  position: fixed;
  z-index: 10020;
  pointer-events: none;
  border: 2px solid #60a5fa;
  border-radius: 12px;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2), 0 0 24px rgba(37, 99, 235, 0.28);
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.site-guided-tour {
  position: fixed;
  z-index: 10021;
  padding: 1rem;
  border: 2px solid #2563eb;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.38);
}

.site-guided-tour h2 {
  margin: 0.3rem 1.5rem 0.4rem 0;
  color: #1e40af;
  font-size: 1rem;
  line-height: 1.3;
}

.site-guided-tour p {
  margin: 0;
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.5;
}

.site-tour-progress,
.context-guide-kicker {
  color: #2563eb;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-tour-close,
.context-guide-close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
}

.site-tour-close:hover,
.context-guide-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.site-tour-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.site-tour-actions .btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.site-tour-actions .site-tour-skip,
.site-tour-actions .site-tour-back {
  border: 1px solid #64748b;
  background: #f8fafc;
  color: #0f172a;
}

.site-tour-actions .site-tour-go {
  border: 1px solid #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}

.site-tour-actions .site-tour-next {
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

.site-tour-actions .btn:hover,
.site-tour-actions .btn:focus-visible {
  filter: brightness(0.93);
}

/* Context-aware local suggestion; intentionally small and non-modal. */
.context-guide-hint {
  position: fixed;
  right: 1rem;
  bottom: 5.25rem;
  z-index: 9500;
  width: min(360px, calc(100vw - 2rem));
  padding: 0.95rem;
  border: 1px solid color-mix(in srgb, var(--border) 72%, #2563eb 28%);
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 14px 40px rgba(2, 8, 23, 0.2);
}

.context-guide-hint strong {
  display: block;
  margin: 0.25rem 1.5rem 0.25rem 0;
  color: #1e40af;
  font-size: 0.88rem;
}

.context-guide-hint p {
  margin: 0;
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.45;
}

.context-guide-hint small {
  display: block;
  margin-top: 0.55rem;
  color: #475569;
  font-size: 0.59rem;
  line-height: 1.35;
}

.context-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.context-guide-actions .btn {
  padding: 0.45rem 0.7rem;
  font-size: 0.68rem;
}

@media (max-width: 680px) {
  .site-guided-tour {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .context-guide-hint {
    right: 0.75rem;
    bottom: 4.75rem;
    width: calc(100vw - 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-tour-highlight {
    transition: none;
  }
}

#journey-path-picker {
  width: 100%;
}

.journey-hero-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  width: 100%;
  box-sizing: border-box;
}

.journey-hero-centered {
  text-align: center;
}

.journey-hero-centered .journey-dismiss {
  display: inline-block;
}

/* Full-width four-tile row (Navigator + Hall of Shame) */
.journey-hero-wide {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.journey-hero-wide .journey-path-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
}

.journey-hero-wide .journey-path-grid-4 .journey-path-btn {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.journey-hero-card h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 0.35rem;
}

.journey-hero-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.journey-path-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  width: 100%;
}

/* Four-path row — always 4 equal columns side by side on tablet+ */
.journey-path-grid.journey-path-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
}

.journey-path-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .journey-path-grid:not(.journey-path-grid-4) {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 721px) {
  .journey-path-grid.journey-path-grid-4,
  .journey-hero-wide .journey-path-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .journey-path-grid.journey-path-grid-4,
  .journey-path-grid-4,
  .journey-hero-wide .journey-path-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .journey-path-grid.journey-path-grid-4,
  .journey-path-grid-4,
  .journey-hero-wide .journey-path-grid-4 {
    grid-template-columns: 1fr;
  }
}

.journey-path-grid-4 .journey-path-btn {
  align-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  box-sizing: border-box;
}

.journey-path-grid-4 .journey-path-btn strong,
.journey-path-grid-4 .journey-path-btn small {
  width: 100%;
}

.journey-path-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.75rem;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.journey-path-btn:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-glow);
}

.journey-path-btn strong {
  font-size: 0.82rem;
  color: var(--text);
}

.journey-path-btn small {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.journey-dismiss {
  margin-top: 0.65rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.nav-resume-banner,
.enhance-notice-banner {
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  background: var(--brand-glow);
}

.nav-resume-banner strong,
.enhance-notice-banner strong {
  display: block;
  font-size: 0.82rem;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.nav-resume-banner p,
.enhance-notice-banner p {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
}

.nav-resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.deadline-critical-banner {
  border: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}

.deadline-critical-banner strong {
  color: #b91c1c;
  font-size: 0.85rem;
}

.deadline-critical-banner p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

.county-sparse-notice {
  border-left: 3px solid var(--warn);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--surface2);
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hashtag-explainer-bar {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: 0.65rem;
  background: var(--surface2);
  border: 1px dashed var(--border);
  margin-bottom: 0.75rem;
}

.hashtag-explainer-bar button {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
}

.publish-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.publish-pipeline-step {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.publish-pipeline-arrow {
  opacity: 0.5;
}

.composer-mode-help {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.5rem;
  line-height: 1.4;
}

.live-widget-updated {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-left: auto;
}

.ticker-title-link {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.ticker-title-link:hover {
  color: var(--brand);
}

.composer-preview-toggle {
  display: none;
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-glow);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .composer-preview-toggle {
    display: block;
  }

  .composer-preview-pane.collapsed-mobile {
    display: none;
  }

  .composer-preview-pane:not(.collapsed-mobile) {
    display: block;
    max-height: min(42vh, 320px);
    overflow: auto;
  }
}

.intake-next-steps {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.intake-next-steps h3 {
  font-size: 0.9rem;
  color: var(--brand);
  margin: 0 0 0.5rem;
}

.intake-next-steps ol {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.intake-next-steps li {
  margin-bottom: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .live-ticker-active .live-ticker-track {
    animation: none !important;
  }

  .journey-path-btn {
    transition: none;
  }
}

.phase2-laws-panel,
.phase2-deadline-panel {
  border-left: 3px solid var(--brand);
}

.phase3-matter-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}
