@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* Color System */
    --bg-primary: #0E1116;
    --bg-secondary: #141923;
    --bg-tertiary: #1A2030;

    --text-primary: #E6E8EB;
    --text-secondary: #A6B0C3;
    --text-tertiary: #6F7A90;

    --accent-primary: #4DA3FF;
    --accent-warning: #FFB454;
    --accent-danger: #FF6B6B;
    --accent-success: #5ED9A4;

    --border-subtle: rgba(255, 255, 255, 0.08);

    /* Typography Scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 22px;
    --text-2xl: 28px;
    --text-3xl: 36px;
    --text-4xl: 48px;
  }

  body {
    @apply bg-bg-primary text-text-primary font-sans antialiased;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    @apply font-serif font-medium;
  }

  /* Hide default details marker across browsers */
  summary {
    list-style: none;
  }

  summary::-webkit-details-marker {
    display: none;
  }

  summary::marker {
    display: none;
  }
}

@layer utilities {
  .animate-subtle-pulse {
    animation: subtle-pulse 2.5s ease-in-out infinite;
  }

  @keyframes subtle-pulse {
    0%, 100% {
      filter: brightness(1) drop-shadow(0 0 0px rgba(6, 182, 212, 0));
    }
    50% {
      filter: brightness(1.3) drop-shadow(0 0 10px rgba(6, 182, 212, 0.9));
    }
  }
}

@layer components {
  .answer-clip {
    mask-image: linear-gradient(to bottom, black 68%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 68%, transparent 100%);
  }

  .landing-btn-primary {
    @apply inline-flex items-center justify-center rounded-md bg-accent-primary px-8 py-3 text-sm font-medium text-white shadow-lg shadow-accent-primary/20 transition-all hover:bg-blue-500 hover:shadow-accent-primary/40 focus:outline-none focus:ring-2 focus:ring-accent-primary focus:ring-offset-2 focus:ring-offset-bg-primary;
  }

  .landing-btn-secondary {
    @apply inline-flex items-center justify-center rounded-md border border-border-subtle bg-transparent px-6 py-3 text-sm font-medium text-text-secondary transition-colors hover:border-text-secondary hover:text-text-primary focus:outline-none;
  }

  .landing-card {
    @apply rounded-lg border border-border-subtle bg-bg-secondary p-6;
  }
}

/* Interview Modal Styles */
/* Uses TrueStandard design system colors and patterns */

/* Option button styling */
.interview-option {
  transition: all 0.15s ease-out;
}

.interview-option:hover {
  transform: translateX(2px);
}

.interview-option:active {
  transform: translateX(0);
}

/* Option badge (numbered) */
.interview-option-badge {
  font-variant-numeric: tabular-nums;
}

/* Slide animations for question transitions */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-left {
  animation: slideInLeft 0.2s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.2s ease-out;
}

/* Modal enter animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

[data-interview-target="modal"]:not(.hidden) {
  animation: modalFadeIn 0.2s ease-out;
}

[data-interview-target="modal"]:not(.hidden) > div:last-child {
  animation: modalSlideUp 0.25s ease-out;
}

/* Progress bar animation */
[data-interview-target="modal"] .bg-cyan-500 {
  transition: width 0.3s ease-out;
}

/* Mobile full-screen mode */
@media (max-width: 640px) {
  [data-interview-target="modal"] > div:last-child {
    margin: 0;
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  [data-interview-target="questionContainer"] {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Keyboard hint styling */
.interview-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.25rem;
}

/* Focus states for accessibility */
.interview-option:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

[data-interview-target="customInput"]:focus-visible {
  outline: none;
  ring: 2px solid #06b6d4;
}
.fc-chip { display: inline-block; font-family: var(--font-sans, sans-serif); font-size: 12px; font-weight: 700; line-height: 1.4; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.fc-chip-accurate { background: #10B981; color: #111827; }
.fc-chip-mostly-accurate { background: #5ED9A4; color: #111827; }
.fc-chip-missing-context { background: #FBBF24; color: #111827; }
.fc-chip-misleading { background: #FFB454; color: #111827; }
.fc-chip-inaccurate { background: #F87171; color: #111827; }
.fc-chip-unsupported { background: #9CA3AF; color: #111827; }

.fc-fill-accurate { fill: #10B981; background: #10B981; }
.fc-fill-mostly-accurate { fill: #5ED9A4; background: #5ED9A4; }
.fc-fill-missing-context { fill: #FBBF24; background: #FBBF24; }
.fc-fill-misleading { fill: #FFB454; background: #FFB454; }
.fc-fill-inaccurate { fill: #F87171; background: #F87171; }
.fc-fill-unsupported { fill: #9CA3AF; background: #9CA3AF; }

.fc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--font-sans, sans-serif); font-size: 12px; color: #D1D5DB; }
.fc-legend li { display: inline-flex; align-items: center; gap: 6px; }
.fc-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

.fc-tape-wide { display: none; }
.fc-tape-narrow { display: block; }
@media (min-width: 768px) {
  .fc-tape-wide { display: block; }
  .fc-tape-narrow { display: none; }
}
.fc-tape rect { stroke: #000000; stroke-width: 1; }
.fc-tape .fc-mark-finding { stroke: #22D3EE; stroke-width: 2.5; }
.fc-seg { fill: #1F2937; }
.fc-seg-label { fill: #9CA3AF; font-family: var(--font-sans, sans-serif); font-size: 12px; }
.fc-axis-label { fill: #9CA3AF; font-family: var(--font-mono, monospace); font-size: 11px; }
.fc-pin { fill: #22D3EE; }
.fc-pin-number { fill: #111827; font-family: var(--font-mono, monospace); font-size: 12px; font-weight: 700; }
.fc-pin-label { fill: #FFFFFF; font-family: var(--font-sans, sans-serif); font-size: 13px; font-weight: 600; }
.fc-pin-stem { stroke: #22D3EE; stroke-width: 1; }
.fc-tape a:hover .fc-pin-label, .fc-tape a:focus .fc-pin-label { fill: #22D3EE; }
.fc-lane-hit { fill: transparent; stroke: none; cursor: pointer; }
.fc-tape .fc-mark:focus { outline: none; }
.fc-tape .fc-mark:focus rect { stroke: #FFFFFF; stroke-width: 2.5; }
.fc-tape-tip { position: absolute; z-index: 20; width: 260px; max-width: calc(100% - 8px); background: #111827; border: 1px solid #374151; border-radius: 10px; padding: 10px 12px; }
.fc-tape-tip[hidden] { display: none; }

.fc-toc-row { display: grid; grid-template-columns: 20px 64px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #1F2937; }
.fc-toc-row:hover .font-display { color: #22D3EE; }

.fc-minitape { position: sticky; top: 0; z-index: 30; background: #000000; border-bottom: 1px solid #1F2937; padding: 10px 0 8px; }
.fc-playhead { fill: #FFFFFF; transition: x 0.2s ease; }

.fc-rail { position: relative; }
.fc-rail-row { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding-bottom: 20px; scroll-margin-top: 72px; }
.fc-rail-row::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #1F2937; }
.fc-rail-time { display: none; }
.fc-rail-mark { position: relative; z-index: 1; width: 14px; height: 14px; margin: 4px 0 0 4px; border-radius: 50%; border: 2px solid #000000; }
.fc-rail-mark-segment { border-radius: 3px; background: #000000; border-color: #374151; margin-top: 2px; }
.fc-rail-mark-finding { width: 22px; height: 22px; margin: 0; background: #22D3EE; color: #111827; font: 700 11px/18px var(--font-mono, monospace); text-align: center; }
.fc-rail-body { min-width: 0; }
.fc-rail-segment { padding-top: 12px; }
@media (min-width: 768px) {
  .fc-rail-row { grid-template-columns: 64px 22px minmax(0, 1fr); }
  .fc-rail-row::before { left: 86px; }
  .fc-rail-time { display: block; font-family: var(--font-mono, monospace); font-size: 12px; color: #22D3EE; text-align: right; padding-top: 3px; }
  .fc-rail-segment .fc-rail-time { color: #9CA3AF; }
}

.fc-chapter { background: #0E1116; border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 12px; padding: 18px; }
@media (min-width: 768px) { .fc-chapter { padding: 24px; } }
.fc-card { background: #111827; border: 1px solid #1F2937; border-radius: 10px; padding: 14px 16px; }
.fc-quote { font-family: var(--font-display, serif); font-style: italic; font-size: 14px; line-height: 1.6; color: #D1D5DB; border-left: 2px solid #374151; padding-left: 12px; margin-top: 8px; }
.fc-time-link { font-family: var(--font-mono, monospace); font-size: 12px; color: #22D3EE; border: 1px solid #374151; border-radius: 999px; padding: 1px 8px; }
.fc-time-link:hover { border-color: #22D3EE; }
.fc-details summary { list-style: none; }
.fc-details summary::-webkit-details-marker { display: none; }
.fc-details summary::after { content: " ▾"; }
.fc-details[open] summary::after { content: " ▴"; }

.fc-ai-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #1F2937; font-family: var(--font-sans, sans-serif); font-size: 12px; }
.fc-ai-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.fc-ai-matched { background: #10B981; }
.fc-ai-cant-check { background: #6B7280; }
.fc-ai-wrong { background: #EF4444; }
.fc-ai-disputes { background: #FBBF24; }
.fc-ai-text-matched { color: #34D399; }
.fc-ai-text-cant-check { color: #9CA3AF; }
.fc-ai-text-wrong { color: #F87171; }
.fc-ai-text-disputes { color: #FBBF24; }

.fc-chart { background: #111827; border: 1px solid #1F2937; border-radius: 10px; padding: 14px; }
.fc-chart-caption { font-family: var(--font-mono, monospace); font-size: 11px; line-height: 1.5; color: #9CA3AF; margin-top: 10px; }
.fc-band { fill: #10B981; fill-opacity: 0.14; }
.fc-band-label { fill: #34D399; font-family: var(--font-sans, sans-serif); font-size: 13px; }
.fc-reference { stroke: #F87171; stroke-width: 1.5; stroke-dasharray: 5 5; }
.fc-reference-label { fill: #F87171; font-family: var(--font-sans, sans-serif); font-size: 13px; }
.fc-line { fill: none; stroke: #22D3EE; stroke-width: 2.5; stroke-linejoin: round; }
.fc-dot { fill: #22D3EE; }
.fc-dot-in { fill: #34D399; }

.fc-nvf { gap: 4px; }
.fc-nvf-row { display: grid; grid-template-columns: 76px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; }
.fc-nvf-head { font-family: var(--font-sans, sans-serif); font-size: 11px; color: #9CA3AF; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-nvf-head:hover { color: #22D3EE; }
.fc-nvf-label { font-family: var(--font-sans, sans-serif); font-size: 12px; color: #D1D5DB; }
.fc-nvf-cell { height: 28px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #111827; }
.fc-bucket-holds { background: #10B981; }
.fc-bucket-needs-context { background: #FBBF24; }
.fc-bucket-fails { background: #F87171; }
.fc-nvf-stack { gap: 4px; }
.fc-nvf-stack-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; gap: 4px; align-items: center; }
.fc-nvf-stack .fc-nvf-cell { height: 26px; }

.fc-split-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: center; }
.fc-split-bar { display: flex; height: 30px; border-radius: 4px; overflow: hidden; }
.fc-split-part { display: flex; align-items: center; padding: 0 6px; font-family: var(--font-sans, sans-serif); font-size: 12px; font-weight: 700; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-split-middle { background: #FBBF24; }
.fc-split-rest { background: #374151; }
.fc-split-bottom { background: #6B7280; }
.fc-split-top { background: #22D3EE; }
/* Landing Page Animations - Clinical Precision Aesthetic */
/* Philosophy: Functional animations that explain sequence and draw attention to critical information */

/* Fade-in on scroll */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Consensus bar fill animation */
@keyframes fillBar {
  from {
    width: 0;
  }
  to {
    width: var(--target-width);
  }
}

/* Pulse for disagreement warnings */
@keyframes pulse-warning {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.9;
  }
}

/* Stagger reveal for cards */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in-delay-1 {
  animation: fadeIn 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.animate-fade-in-delay-2 {
  animation: fadeIn 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-fade-in-delay-3 {
  animation: fadeIn 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

/* Consensus bar animation */
.animate-fill-bar {
  animation: fillBar 1.2s cubic-bezier(0.4, 0.0, 0.2, 1) 0.5s forwards;
  width: 0;
}

/* Warning pulse */
.animate-pulse-warning {
  animation: pulse-warning 2s ease-in-out infinite;
}

/* Intersection Observer utility classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover states for interactive elements */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
  }
}

.release-chart-grid { stroke: #1f2937; stroke-width: 1; }
.release-chart-tick { fill: #6b7280; font-family: var(--font-mono, monospace); font-size: 11px; }
.release-chart-label { fill: #ffffff; font-family: var(--font-sans, sans-serif); font-size: 13px; font-weight: 600; }
.release-chart-range { stroke: #22d3ee; stroke-opacity: 0.35; stroke-width: 10; stroke-linecap: round; }
.release-chart-dot { fill: #22d3ee; stroke: #000000; stroke-width: 2; }

.ts-tip { position: relative; display: inline-flex; align-items: center; margin-left: 0.35rem; color: #6b7280; cursor: help; outline: none; }
.ts-tip:hover, .ts-tip:focus { color: #22d3ee; }
.ts-tip-panel { position: absolute; bottom: calc(100% + 8px); right: 0; width: 16rem; padding: 0.6rem 0.75rem; background: #111827; border: 1px solid #374151; border-radius: 0.5rem; color: #d1d5db; font-family: var(--font-sans, sans-serif); font-size: 12px; font-weight: 400; line-height: 1.5; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity 0.12s ease, transform 0.12s ease; z-index: 20; }
.ts-tip:hover .ts-tip-panel, .ts-tip:focus .ts-tip-panel { opacity: 1; transform: none; pointer-events: auto; }
.markdown-body { overflow-wrap: anywhere; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p { margin: 0.75em 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { color: #ffffff; font-weight: 600; line-height: 1.35; margin: 1.25em 0 0.5em; }
.markdown-body h1 { font-size: 1.15em; }
.markdown-body h2 { font-size: 1.1em; }
.markdown-body h3 { font-size: 1.05em; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1em; }
.markdown-body ul, .markdown-body ol { margin: 0.75em 0; padding-left: 1.5em; }
.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body li { margin: 0.25em 0; }
.markdown-body li > p { margin: 0.25em 0; }
.markdown-body strong { color: #ffffff; font-weight: 600; }
.markdown-body a { color: #22d3ee; text-decoration: underline; text-underline-offset: 2px; }
.markdown-body code { font-family: var(--font-mono, monospace); font-size: 0.9em; color: #22d3ee; background: #111827; border: 1px solid #1f2937; border-radius: 0.25rem; padding: 0.1em 0.35em; }
.markdown-body pre { margin: 0.75em 0; padding: 0.75rem 1rem; background: #111827; border: 1px solid #1f2937; border-radius: 0.5rem; overflow-x: auto; }
.markdown-body pre code { border: 0; background: transparent; padding: 0; color: #d1d5db; }
.markdown-body blockquote { margin: 0.75em 0; padding-left: 0.75em; border-left: 2px solid #374151; color: #9ca3af; }
.markdown-body hr { border: 0; border-top: 1px solid #1f2937; margin: 1em 0; }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0.75em 0; font-size: 0.95em; }
.markdown-body th, .markdown-body td { border: 1px solid #1f2937; padding: 0.4em 0.6em; text-align: left; vertical-align: top; }
.markdown-body th { color: #9ca3af; font-family: var(--font-mono, monospace); font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em; }
.markdown-body img { max-width: 100%; }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
