/* ============================================================
   lanexbuilds.com — Entry Page Styles (page-entry.css)
   Requires: tokens.css, base.css, components.css
   One stylesheet: layout + interactive/rendered pipeline diagrams.
   Canonical tokens only. No literal colors or durations.
   ============================================================ */

/* ------------------------------------------------------------
   1. BREADCRUMBS & HERO
   ------------------------------------------------------------ */
.entry-crumb {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-md);
}

.entry-crumb ol,
.entry-crumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--t3);
}

.entry-crumb li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.entry-crumb li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--t3);
  border-top: 1.5px solid var(--t3);
  transform: rotate(45deg);
}

.entry-crumb a,
.entry-crumbs a {
  text-decoration: none;
  color: var(--t2);
  transition: color var(--dur-fast) var(--ease);
}

.entry-crumb a:hover,
.entry-crumbs a:hover {
  color: var(--tx);
  text-decoration: underline;
  text-decoration-color: var(--ac);
}

.entry-crumb [aria-current="page"] {
  color: var(--tx);
  font-weight: 600;
}

.entry-hero {
  border-top: 2px solid var(--ln2);
  padding-top: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.entry-meta-bar,
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
}

.entry-meta-bar .meta-tag,
.badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--ln);
  background: var(--s2);
  color: var(--t2);
}

.entry-meta-bar .meta-origin {
  background: var(--glow);
  color: var(--act);
  border-color: transparent;
}

.entry-meta-bar .meta-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--t3);
  margin-left: auto;
}

.entry-title-h1,
.entry-title {
  font-size: var(--text-hero);
  color: var(--tx);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-sm);
  max-width: 24ch;
}

.entry-summary-p,
.entry-summary {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--t2);
  max-width: 58ch;
  margin-bottom: var(--space-xl);
}

/* ------------------------------------------------------------
   2. SYSTEM PIPELINE DIAGRAM CARD
   ------------------------------------------------------------ */
.entry-diagram-card {
  background: var(--s1);
  border: 1px solid var(--ln);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-xl);
}

.diagram-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ln);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
}

.diagram-heading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--t3);
  margin: 0;
}

.diagram-human-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--pro);
  line-height: 1;
}

.diagram-human-pill svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex: none;
}

.entry-diagram-render {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.entry-flow-full {
  width: 100%;
  height: auto;
  max-height: 140px;
}

.flow-wire {
  stroke: var(--ln2);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.flow-circle {
  fill: var(--s2);
  stroke: var(--ac);
  stroke-width: 2;
}

.flow-circle-appr {
  fill: var(--pro);
  stroke: var(--pro);
}

.flow-node-text {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  fill: var(--tx);
  text-anchor: middle;
}

.entry-approval-banner,
.entry-approval-note,
.approval-note {
  font-size: var(--text-sm);
  color: var(--t2);
  margin-top: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--pro);
  border-radius: var(--radius-sm);
  background: var(--s2);
}

/* ------------------------------------------------------------
   3. ACTIONS CARD
   ------------------------------------------------------------ */
.entry-actions-section {
  margin-bottom: var(--space-xl);
}

.actions-card {
  background: var(--s1);
  border: 1px solid var(--ln);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.actions-title {
  font-size: var(--text-xl);
  color: var(--tx);
  margin-bottom: 4px;
}

.actions-subhead {
  font-size: var(--text-sm);
  color: var(--t2);
  margin: 0;
}

.actions-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ------------------------------------------------------------
   4. CONTENT GRID & DETAILS
   ------------------------------------------------------------ */
.entry-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
  gap: 48px 56px;
  margin-bottom: var(--space-4xl);
}

.content-primary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.entry-sub-title {
  font-size: var(--text-2xl);
  color: var(--tx);
  margin-bottom: var(--space-md);
  border-bottom: 1.5px solid var(--ln);
  padding-bottom: var(--space-xs);
}

.entry-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.entry-check-list li {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--t2);
  position: relative;
  padding-left: 28px;
}

.entry-check-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 6px;
  height: 11px;
  border-right: 2.2px solid var(--ac);
  border-bottom: 2.2px solid var(--ac);
  transform: rotate(45deg);
}

.entry-numbered-flow {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: flowstep;
  display: grid;
  gap: var(--space-lg);
}

.entry-numbered-flow li {
  counter-increment: flowstep;
  position: relative;
  padding-left: 44px;
}

.entry-numbered-flow li::before {
  content: counter(flowstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--glow);
  color: var(--act);
  border: 1.5px solid var(--ac);
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.entry-numbered-flow li p {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--t2);
  margin: 0;
}

/* ------------------------------------------------------------
   5. SIDEBAR
   ------------------------------------------------------------ */
.content-sidebar,
.entry-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sidebar-card,
.get-box {
  background: var(--s1);
  border: 1px solid var(--ln);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.sidebar-title {
  font-size: var(--text-lg);
  color: var(--tx);
  margin-bottom: var(--space-sm);
}

.sidebar-dl,
.meta-list {
  display: grid;
  gap: 12px;
  margin: 0 0 var(--space-md);
  border-bottom: 1px solid var(--ln);
  padding-bottom: var(--space-md);
}

.sidebar-dl dt,
.meta-list dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 2px;
}

.sidebar-dl dd,
.meta-list dd {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--tx);
}

.sidebar-dl dd a,
.sidebar-links-list a,
.meta-list dd a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--act);
  text-decoration: none;
}

.sidebar-dl dd a:hover,
.sidebar-links-list a:hover {
  text-decoration: underline;
}

.sidebar-license-note,
.license-note {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--t2);
  margin: 0;
}

.sidebar-text {
  font-size: var(--text-sm);
  color: var(--t2);
  margin-bottom: var(--space-md);
}

.sidebar-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.services-callout-card {
  background: var(--s2);
}

/* ------------------------------------------------------------
   6. RELATED ENTRIES
   ------------------------------------------------------------ */
.entry-related-section {
  border-top: 2px solid var(--ln2);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}

.related-header {
  margin-bottom: var(--space-xl);
}

.related-title {
  font-size: var(--text-2xl);
  color: var(--tx);
}

.related-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

/* ------------------------------------------------------------
   7. SKELETON & NOTICE
   ------------------------------------------------------------ */
.entry-state-box {
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: var(--space-4xl);
}

.state-notice-card {
  background: var(--s1);
  border: 1.5px dashed var(--ln);
  border-radius: var(--radius-lg);
  padding: 56px var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
}

.state-title {
  font-size: var(--text-2xl);
  color: var(--tx);
  margin-bottom: var(--space-xs);
}

.state-text {
  font-size: var(--text-base);
  color: var(--t2);
  margin-bottom: var(--space-lg);
}

.state-notice-card .notice-icon {
  width: 48px;
  height: 48px;
  stroke: var(--ac);
  stroke-width: 1.8;
  fill: none;
  margin-bottom: var(--space-sm);
}

/* ------------------------------------------------------------
   8. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .entry-content-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .actions-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .actions-buttons {
    width: 100%;
  }
  .actions-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}
