/* Specification pages styling */

/* Prose styling for markdown content */
.spec-content {
  color: #111827;
  line-height: 1.75;
  font-size: 16px;
  max-width: 72ch;
}

.spec-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  margin-top: 0;
}

.spec-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #111827;
  margin-top: 0;
  margin-bottom: 1rem;
}

.spec-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.spec-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.spec-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.spec-content h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.spec-content p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.spec-content ul, .spec-content ol {
  margin-bottom: 1rem;
  margin-left: 1.5rem;
  line-height: 1.75;
}

.spec-content li {
  margin-bottom: 0.5rem;
}

.spec-content ul li {
  list-style-type: disc;
}

.spec-content ol li {
  list-style-type: decimal;
}

.spec-content strong {
  font-weight: 600;
  color: #111827;
}

.spec-content em {
  font-style: italic;
}

.spec-content blockquote {
  @apply border-l-4 border-blue-500 pl-4 italic text-gray-700 bg-blue-50 py-2 my-4;
}

.spec-content blockquote p {
  @apply mb-2;
}

.spec-content code {
  background-color: #f3f4f6;
  color: #1f2937;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.spec-content pre {
  background-color: #faf9f7;
  color: #374151;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 100%;
  border: 1px solid #e5e7eb;
}

.spec-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* Enhanced code block styling */
.spec-content .spec-code-block {
  background-color: #faf9f7;
  color: #374151;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 100%;
  white-space: pre;
  word-wrap: break-word;
  border: 1px solid #e5e7eb;
}

/* Highlighted code blocks */
.spec-content .highlight {
  background-color: #faf9f7 !important;
  border-radius: 0.5rem;
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid #e5e7eb;
}

.spec-content table {
  @apply w-full border-collapse border border-gray-300 my-4;
}

.spec-content th {
  @apply bg-gray-50 border border-gray-300 px-4 py-2 text-left font-semibold;
}

.spec-content td {
  @apply border border-gray-300 px-4 py-2;
}

.spec-content a {
  @apply text-blue-600 hover:text-blue-800 underline;
}

.spec-content strong {
  @apply font-semibold;
}

.spec-content em {
  @apply italic;
}

.spec-content hr {
  @apply border-0 border-t border-gray-300 my-8;
}

/* JSON code block styling */
.spec-content pre code.language-json {
  @apply text-green-300;
}

.spec-content .highlight {
  @apply bg-gray-900 rounded-lg;
}

/* Line clamp utility for card descriptions */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom styling for spec cards */
.spec-card {
  transition: all 0.2s ease-in-out;
}

.spec-card:hover {
  @apply shadow-md transform -translate-y-1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .spec-content {
    @apply text-sm;
  }
  
  .spec-content h1 {
    @apply text-2xl;
  }
  
  .spec-content h2 {
    @apply text-xl;
  }
  
  .spec-content h3 {
    @apply text-lg;
  }
  
  .spec-content pre {
    @apply text-xs p-3;
  }
  
  .spec-content table {
    @apply text-sm;
  }
  
  .spec-content th,
  .spec-content td {
    @apply px-2 py-1;
  }
}

/* Print styles */
@media print {
  .spec-content {
    @apply text-black;
  }
  
  .spec-content a {
    @apply text-black no-underline;
  }
  
  .spec-content pre {
    @apply bg-gray-100 text-black border border-gray-400;
  }
  
  .spec-content blockquote {
    @apply bg-gray-100 border-gray-400;
  }
}

/* Syntax highlighting for Rouge - Light theme optimized */
.highlight .hll { background-color: #fff3cd }
.highlight .c { color: #6a737d; font-style: italic } /* Comment */
.highlight .err { color: #d73a49 } /* Error - removed border */
.highlight .g { color: #24292e } /* Generic */
.highlight .k { color: #d73a49; font-weight: bold } /* Keyword */
.highlight .l { color: #032f62 } /* Literal */
.highlight .n { color: #24292e } /* Name */
.highlight .o { color: #d73a49 } /* Operator */
.highlight .x { color: #24292e } /* Other */
.highlight .p { color: #24292e } /* Punctuation */
.highlight .ch { color: #6a737d; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #6a737d; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #6a737d; font-style: italic } /* Comment.Preproc */
.highlight .cpf { color: #6a737d; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #6a737d; font-style: italic } /* Comment.Single */
.highlight .cs { color: #6a737d; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #000000; font-style: italic } /* Generic.Output */
.highlight .gp { color: #8f5902 } /* Generic.Prompt */
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
.highlight .ld { color: #000000 } /* Literal.Date */
.highlight .m { color: #005cc5; font-weight: bold } /* Literal.Number */
.highlight .s { color: #032f62 } /* Literal.String */
.highlight .na { color: #e36209 } /* Name.Attribute */
.highlight .nb { color: #005cc5 } /* Name.Builtin */
.highlight .nc { color: #6f42c1 } /* Name.Class */
.highlight .no { color: #005cc5 } /* Name.Constant */
.highlight .nd { color: #6f42c1; font-weight: bold } /* Name.Decorator */
.highlight .ni { color: #e36209 } /* Name.Entity */
.highlight .ne { color: #d73a49; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #6f42c1 } /* Name.Function */
.highlight .nl { color: #e36209 } /* Name.Label */
.highlight .nn { color: #24292e } /* Name.Namespace */
.highlight .nx { color: #24292e } /* Name.Other */
.highlight .py { color: #24292e } /* Name.Property */
.highlight .nt { color: #22863a; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #24292e } /* Name.Variable */
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
.highlight .w { color: #f8f8f8; text-decoration: underline } /* Text.Whitespace */
.highlight .mb { color: #005cc5; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #005cc5; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #005cc5; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #005cc5; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #005cc5; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #032f62 } /* Literal.String.Affix */
.highlight .sb { color: #032f62 } /* Literal.String.Backtick */
.highlight .sc { color: #032f62 } /* Literal.String.Char */
.highlight .dl { color: #032f62 } /* Literal.String.Delimiter */
.highlight .sd { color: #6a737d; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #032f62 } /* Literal.String.Double */
.highlight .se { color: #032f62 } /* Literal.String.Escape */
.highlight .sh { color: #032f62 } /* Literal.String.Heredoc */
.highlight .si { color: #032f62 } /* Literal.String.Interpol */
.highlight .sx { color: #032f62 } /* Literal.String.Other */
.highlight .sr { color: #032f62 } /* Literal.String.Regex */
.highlight .s1 { color: #032f62 } /* Literal.String.Single */
.highlight .ss { color: #032f62 } /* Literal.String.Symbol */
.highlight .bp { color: #005cc5 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #6f42c1 } /* Name.Function.Magic */
.highlight .vc { color: #24292e } /* Name.Variable.Class */
.highlight .vg { color: #24292e } /* Name.Variable.Global */
.highlight .vi { color: #24292e } /* Name.Variable.Instance */
.highlight .vm { color: #24292e } /* Name.Variable.Magic */
.highlight .il { color: #005cc5; font-weight: bold } /* Literal.Number.Integer.Long */

/* ============================================================
   Status pills + progress bars (used on specs index, show, roadmap)
   ============================================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.625rem 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
  min-width: 5.75rem;
}

.status-pill-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: currentColor;
  flex-shrink: 0;
}

.status-pill-shipped   { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.status-pill-refining  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.status-pill-prototype { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.status-pill-planned   { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.status-pill-untracked { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; }

.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-sm {
  height: 4px;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 200ms ease;
  background: #4b5563;
}

.progress-bar-fill-shipped   { background: #10b981; }
.progress-bar-fill-refining  { background: #3b82f6; }
.progress-bar-fill-prototype { background: #f59e0b; }
.progress-bar-fill-planned   { background: #d1d5db; }

/* Category-tinted fills on the roadmap page (subtle variation per section) */
.progress-bar-fill-core         { background: linear-gradient(90deg, #10b981, #3b82f6); }
.progress-bar-fill-schedules    { background: linear-gradient(90deg, #10b981, #f59e0b); }
.progress-bar-fill-commands     { background: linear-gradient(90deg, #f59e0b, #3b82f6); }
.progress-bar-fill-vc           { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.progress-bar-fill-procurement  { background: linear-gradient(90deg, #d1d5db, #f59e0b); }
.progress-bar-fill-data_layer   { background: linear-gradient(90deg, #3b82f6, #10b981); }
.progress-bar-fill-integrations { background: linear-gradient(90deg, #8b5cf6, #10b981); }
.progress-bar-fill-ux           { background: linear-gradient(90deg, #10b981, #6366f1); }

/* ============================================================
   Roadmap teaser (specs index)
   ============================================================ */

.roadmap-teaser {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.roadmap-teaser:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.roadmap-teaser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.roadmap-teaser-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: #6366f1;
  margin-bottom: 0.125rem;
}

.roadmap-teaser-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.roadmap-teaser-cta {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4f46e5;
}

.roadmap-teaser-bar {
  display: flex;
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.625rem;
}

.roadmap-teaser-segment {
  height: 100%;
  transition: width 200ms ease;
}

.roadmap-teaser-segment-shipped   { background: #10b981; }
.roadmap-teaser-segment-refining  { background: #3b82f6; }
.roadmap-teaser-segment-prototype { background: #f59e0b; }
.roadmap-teaser-segment-planned   { background: #d1d5db; }

.roadmap-teaser-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

/* ============================================================
   Roadmap page (/specs/roadmap)
   ============================================================ */

.roadmap-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .roadmap-hero {
    grid-template-columns: 1fr;
    padding: 1.25rem 1.25rem;
  }
}

.roadmap-hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.375rem 0;
  letter-spacing: -0.01em;
}

.roadmap-hero-sub {
  font-size: 0.9375rem;
  color: #475569;
  margin: 0;
  line-height: 1.55;
  max-width: 52ch;
}

.roadmap-hero-meter {
  text-align: right;
}

.roadmap-hero-percent {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.02em;
}

.roadmap-hero-percent span {
  font-size: 1.25rem;
  font-weight: 500;
  color: #64748b;
  margin-left: 0.125rem;
}

.roadmap-hero-percent-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: #94a3b8;
  margin: 0.25rem 0 0.75rem 0;
}

.roadmap-hero-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .roadmap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.roadmap-category-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
}

.roadmap-category-head {
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid #f3f4f6;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
}

.roadmap-category-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.roadmap-category-summary {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0.25rem 0 0;
  line-height: 1.45;
}

.roadmap-category-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.roadmap-category-meter .progress-bar {
  flex: 1;
  height: 5px;
}

.roadmap-category-percent {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  min-width: 2.75rem;
  text-align: right;
}

.roadmap-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.roadmap-item-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  border-top: 1px solid #f3f4f6;
}

.roadmap-item-row:first-child {
  border-top: 0;
}

.roadmap-item-row:hover {
  background: #fafbfc;
}

.roadmap-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.roadmap-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.35;
}

.roadmap-item-title-link {
  color: #1f2937;
  text-decoration: none;
}

.roadmap-item-title-link:hover {
  color: #4f46e5;
  text-decoration: underline;
}

.roadmap-item-note {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}

.roadmap-item-bar {
  width: 80px;
}

.roadmap-footnote {
  margin-top: 1.5rem;
  padding: 0.875rem 1.125rem;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 0.5rem;
}

.roadmap-footnote p {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.55;
}

.roadmap-footnote code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.25rem;
  padding: 0.0625rem 0.3125rem;
  font-size: 0.75rem;
  color: #374151;
}