/* OffGridSpec Field Guides — Shared Technical Article & Interactive Widget Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.article-breadcrumb-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.7rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.article-breadcrumb-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-breadcrumb-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-breadcrumb-links a {
  color: var(--accent-amber);
  text-decoration: none;
}

.article-breadcrumb-links a:hover {
  text-decoration: underline;
}

.article-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2.75rem;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.article-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.article-meta-item strong {
  color: var(--accent-emerald);
}

.article-hero-figure {
  margin: 0 0 2.25rem 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.article-hero-caption {
  padding: 0.75rem 1.15rem;
  background: #080c14;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.article-hero-caption span.telemetry-tag {
  color: var(--accent-amber);
}

/* Key Takeaway Summary Box */
.tldr-box {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.09), rgba(16, 185, 129, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin-bottom: 2.25rem;
}

.tldr-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-amber);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tldr-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-primary);
  font-size: 0.94rem;
  display: grid;
  gap: 0.45rem;
}

.tldr-list li strong {
  color: var(--accent-emerald);
  font-family: var(--font-mono);
}

/* Prose Typography */
.article-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.38rem, 2.4vw, 1.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.6rem 0 0.95rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.02em;
}

.article-prose h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin: 1.85rem 0 0.65rem;
}

.article-prose p {
  color: var(--text-secondary);
  font-size: 1.01rem;
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.article-prose ul,
.article-prose ol {
  color: var(--text-secondary);
  padding-left: 1.4rem;
  margin-bottom: 1.35rem;
  display: grid;
  gap: 0.55rem;
  line-height: 1.68;
}

.article-prose li strong {
  color: var(--text-primary);
}

.article-prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-surface);
  color: var(--accent-cyan);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* Formula & Telemetry Callouts */
.formula-block {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
}

.formula-block .formula-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  display: block;
}

.formula-block .formula-eq {
  font-size: 1.02rem;
  color: var(--text-primary);
  font-weight: 700;
  overflow-x: auto;
  padding: 0.25rem 0;
}

.formula-block .formula-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.45rem;
  font-family: var(--font-sans);
}

/* Engineering Data Tables */
.data-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}

.eng-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.eng-table th {
  background: #090d16;
  color: var(--accent-amber);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.eng-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(38, 51, 77, 0.6);
  color: var(--text-secondary);
  vertical-align: middle;
}

.eng-table tr:last-child td {
  border-bottom: none;
}

.eng-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.eng-table td.mono-val {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

.badge-pass {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-warn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-amber-soft);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-fail {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Interactive Inline Estimator Widget */
.guide-widget-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, #101726 100%);
  border: 2px solid var(--accent-amber);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2.25rem 0;
  box-shadow: var(--shadow-card);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widget-header h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin: 0.2rem 0 0;
}

.widget-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.widget-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.widget-field select,
.widget-field input {
  width: 100%;
  padding: 0.68rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.widget-field select:focus,
.widget-field input:focus {
  outline: none;
  border-color: var(--accent-amber);
}

.widget-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.widget-kpi {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
}

.widget-kpi-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.widget-kpi-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-amber);
}

.widget-kpi-val.emerald {
  color: var(--accent-emerald);
}

.widget-kpi-val.cyan {
  color: var(--accent-cyan);
}

.widget-kpi-val.danger {
  color: var(--accent-danger);
}

.widget-kpi-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.widget-recommendation-banner {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.widget-recommendation-banner.danger-banner {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.45);
}

/* Telemetry Step Cards */
.telemetry-steps {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.telemetry-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-emerald);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
}

.telemetry-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.telemetry-step-header strong {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.telemetry-reading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}

/* Hardware Recommendation Cards inside Article */
.rec-hardware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.35rem;
  margin: 1.5rem 0 2rem;
}

.rec-hw-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.rec-hw-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.rec-hw-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rec-hw-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.rec-hw-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.rec-hw-specs {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-amber);
  margin-bottom: 0.65rem;
}

.rec-hw-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  flex: 1;
}

/* Sidebar Sticky Navigation & Spec Summary */
.article-sidebar {
  position: sticky;
  top: 5.2rem;
  display: grid;
  gap: 1.35rem;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-amber);
  margin-bottom: 0.85rem;
  display: block;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  line-height: 1.4;
  display: block;
  padding-left: 0.65rem;
  border-left: 2px solid var(--border-subtle);
  transition: all 0.15s ease;
}

.toc-list a:hover {
  color: var(--accent-amber);
  border-left-color: var(--accent-amber);
}

.svg-diagram-box {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
}

.svg-diagram-caption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}

@media (max-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
  }
}
