/* Appily Twentytwo — Seed Lineage Blueprint Atlas company info */

.page-blueprint-atlas {
  --bp-blueprint: #1a3a5c;
  --bp-blueprint-soft: #2a5078;
  --bp-blueprint-pale: #e8f2fa;
  --bp-cyan: #5eb8d4;
  --bp-cyan-pale: #d8f0f8;
  --bp-amber: #e8a838;
  --bp-amber-pale: #fff4dc;
  --bp-sage: #81b29a;
  --bp-sage-pale: #e8f3ed;
  --bp-coral: #e07a5f;
  --bp-coral-pale: #fce9e4;
  --bp-plum: #2a1f3d;
  --bp-ink: #1a1423;
  --bp-muted: #6b6378;
  --bp-line: #c8d8e8;
  --bp-paper: #f8fbfd;
  --bp-grid: rgba(94, 184, 212, 0.15);
  background: var(--bp-paper);
}

/* Shared */
.bp-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bp-cyan);
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
}

.bp-btn-primary {
  background: var(--bp-blueprint);
  color: #fff;
}

.bp-btn-primary:hover {
  background: var(--bp-blueprint-soft);
  transform: translateY(-2px);
}

.bp-btn-outline {
  background: transparent;
  color: var(--bp-blueprint);
  border-color: var(--bp-line);
}

.bp-btn-outline:hover {
  background: var(--bp-cyan-pale);
  border-color: var(--bp-cyan);
}

/* ── Drafting table hero ── */
.bp-drafting {
  position: relative;
  padding: 44px 0 0;
  background: linear-gradient(165deg, #0f2438 0%, var(--bp-blueprint) 50%, #1e4568 100%);
  color: #fff;
  overflow: hidden;
}

.bp-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bp-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.15;
}

.bp-crosshair::before,
.bp-crosshair::after {
  content: '';
  position: absolute;
  background: var(--bp-cyan);
}

.bp-crosshair::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.bp-crosshair::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.bp-drafting-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr);
  gap: 36px;
  align-items: center;
  padding-bottom: 52px;
}

.bp-drafting-copy h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  line-height: 1.12;
}

.bp-drafting-copy h1 em {
  font-style: italic;
  color: var(--bp-cyan);
}

.bp-lede {
  margin: 0 0 22px;
  max-width: 52ch;
  font-size: 0.94rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.bp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-stats li {
  text-align: center;
  min-width: 80px;
  padding: 12px 16px;
  border: 1px solid rgba(94, 184, 212, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.bp-stats strong {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--bp-cyan);
}

.bp-stats span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* Title block */
.bp-title-block {
  position: relative;
  text-align: left;
  padding: 20px 18px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(94, 184, 212, 0.4);
  border-radius: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.bp-block-corner {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--bp-cyan);
  border-right: 2px solid var(--bp-cyan);
}

.bp-block-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.bp-block-code {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.bp-block-scale {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.bp-block-entity {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 8px;
}

.bp-block-rev {
  display: block;
  font-size: 0.65rem;
  color: var(--bp-amber);
  text-align: right;
}

.bp-drafting-edge {
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    var(--bp-cyan) 0 12px,
    var(--bp-blueprint) 12px 24px
  );
}

/* ── Archive layout ── */
.bp-archive {
  padding: 36px 0 80px;
  background: linear-gradient(180deg, var(--bp-blueprint-pale) 0%, var(--bp-paper) 60px);
}

.bp-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* Ruler tab navigation */
.bp-ruler-rail {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bp-rail-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bp-muted);
  margin-bottom: 8px;
  padding-left: 8px;
}

.bp-rail-line {
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--bp-blueprint) 0 8px,
    transparent 8px 16px
  );
}

.bp-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  text-decoration: none;
  border-radius: 0 4px 4px 0;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.bp-tab:hover {
  background: #fff;
  border-color: var(--bp-line);
}

.bp-tab.is-active {
  background: #fff;
  border-color: var(--bp-cyan);
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.08);
}

.bp-tab-notch {
  width: 8px;
  height: 24px;
  border-radius: 0 2px 2px 0;
  background: var(--bp-cyan);
  flex-shrink: 0;
}

.bp-notch-sage { background: var(--bp-sage); }
.bp-notch-amber { background: var(--bp-amber); }
.bp-notch-coral { background: var(--bp-coral); }
.bp-notch-plum { background: var(--bp-plum); }

.bp-tab-num {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bp-blueprint);
  min-width: 22px;
}

.bp-tab-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bp-ink);
}

/* Sheet articles */
.bp-sheets {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bp-sheet {
  position: relative;
  background: #fff;
  border: 2px solid var(--bp-line);
  border-radius: 4px;
  padding: 28px 28px 32px;
  box-shadow: 0 8px 32px rgba(26, 58, 92, 0.06);
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bp-sheet::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  border-left: 2px solid var(--bp-cyan);
  border-top: 2px solid var(--bp-cyan);
  pointer-events: none;
  opacity: 0.5;
}

.bp-sheet-alt {
  background-color: var(--bp-blueprint-pale);
}

.bp-sheet-registrar {
  background: linear-gradient(180deg, var(--bp-amber-pale) 0%, #fff 100%);
}

.bp-sheet-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--bp-blueprint);
}

.bp-sheet-code {
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-cyan);
  padding: 4px 8px;
  border: 1px solid var(--bp-cyan);
  border-radius: 2px;
}

.bp-sheet-head h2 {
  margin: 0;
  flex: 1;
  font-size: 1.45rem;
  color: var(--bp-ink);
  min-width: 180px;
}

.bp-sheet-ref {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--bp-muted);
}

.bp-sheet-lede {
  margin: 0 0 22px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--bp-muted);
  max-width: 65ch;
}

/* Story grids */
.bp-story-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.bp-story-grid-reverse {
  direction: rtl;
}

.bp-story-grid-reverse > * {
  direction: ltr;
}

.bp-story-copy p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--bp-ink);
}

.bp-story-copy p:last-child {
  margin-bottom: 0;
}

.bp-mission-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bp-mission-list li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--bp-ink);
}

.bp-mission-mark {
  flex-shrink: 0;
  color: var(--bp-cyan);
  font-size: 0.75rem;
  font-weight: 700;
}

.bp-mission-list strong {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 2px;
}

/* Drawing mount figures */
.bp-drawing-mount {
  position: relative;
  margin: 0;
  padding: 12px;
  background: #fff;
  border: 2px solid var(--bp-blueprint);
  border-radius: 2px;
}

.bp-drawing-frame {
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--bp-cyan);
  pointer-events: none;
}

.bp-drawing-mount img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.bp-drawing-mount figcaption {
  margin-top: 10px;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--bp-muted);
  text-align: center;
}

.bp-drawing-mount-sm {
  max-width: 220px;
}

.bp-drawing-mount-sm img {
  aspect-ratio: 1;
}

/* Plot grid */
.bp-plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.bp-plot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 20px 14px 16px;
  border-radius: 4px;
  border: 2px solid var(--bp-line);
  text-decoration: none;
  background: #fff;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.bp-plot:hover {
  transform: translateY(-4px);
  border-color: var(--bp-cyan);
  box-shadow: 0 8px 24px rgba(26, 58, 92, 0.1);
}

.bp-plot-glyph {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.bp-plot-code {
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bp-blueprint);
  opacity: 0.7;
}

.bp-plot-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--bp-ink);
  line-height: 1.3;
}

.bp-plot-count {
  font-size: 0.72rem;
  color: var(--bp-muted);
}

.bp-plot-a { border-left: 4px solid var(--bp-cyan); }
.bp-plot-b { border-left: 4px solid var(--bp-sage); }
.bp-plot-c { border-left: 4px solid var(--bp-amber); }
.bp-plot-d { border-left: 4px solid var(--bp-coral); }
.bp-plot-e { border-left: 4px solid var(--bp-plum); }
.bp-plot-f { border-left: 4px solid #3d5a80; }
.bp-plot-g { border-left: 4px solid #7a9a6a; }

.bp-benefit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.bp-benefit-strip li {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 2px;
  background: var(--bp-cyan-pale);
  border: 1px solid rgba(94, 184, 212, 0.35);
  color: var(--bp-blueprint);
}

.bp-catalog-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.bp-catalog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Compass values */
.bp-compass {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-compass-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid var(--bp-blueprint);
  opacity: 0.3;
}

.bp-compass-ring::before {
  content: '';
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  border: 1px dashed var(--bp-cyan);
}

.bp-compass-core {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bp-blueprint);
  color: var(--bp-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  z-index: 2;
  border: 2px solid var(--bp-cyan);
}

.bp-bearing {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  max-width: 120px;
  padding: 12px;
  background: #fff;
  border: 2px solid var(--bp-line);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(26, 58, 92, 0.06);
}

.bp-bearing-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bp-blueprint);
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: 0.65rem;
  font-weight: 700;
}

.bp-bearing strong {
  font-size: 0.82rem;
  color: var(--bp-ink);
}

.bp-bearing span:last-child {
  font-size: 0.72rem;
  color: var(--bp-muted);
}

.bp-bearing-n { top: 0; left: 50%; transform: translateX(-50%); }
.bp-bearing-e { right: 0; top: 50%; transform: translateY(-50%); }
.bp-bearing-s { bottom: 0; left: 50%; transform: translateX(-50%); }
.bp-bearing-w { left: 0; top: 50%; transform: translateY(-50%); }

/* Registrar block */
.bp-registrar {
  position: relative;
  padding: 28px 20px 20px;
  background: #fff;
  border: 2px solid var(--bp-blueprint);
  border-radius: 4px;
}

.bp-registrar-stamp {
  position: absolute;
  top: 12px;
  right: 16px;
  font-family: ui-monospace, monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--bp-sage);
  border: 2px solid var(--bp-sage);
  padding: 4px 10px;
  border-radius: 2px;
  transform: rotate(-6deg);
  opacity: 0.6;
}

.bp-registrar-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.bp-registrar-cell {
  padding: 14px 16px;
  background: var(--bp-blueprint-pale);
  border-radius: 2px;
  border-left: 4px solid var(--bp-cyan);
}

.bp-registrar-primary {
  grid-column: 1 / -1;
  border-left-color: var(--bp-blueprint);
  background: var(--bp-cyan-pale);
}

.bp-registrar-wide {
  grid-column: 1 / -1;
}

.bp-registrar-label {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-muted);
  margin-bottom: 4px;
}

.bp-registrar-value {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bp-ink);
  line-height: 1.45;
}

.bp-registrar-value a {
  color: var(--bp-blueprint);
}

.bp-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem !important;
}

.bp-policy-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.bp-policy-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--bp-line);
  border-radius: 4px;
  transition: border-color var(--transition), background var(--transition);
}

.bp-policy-link:hover {
  background: var(--bp-cyan-pale);
  border-color: var(--bp-cyan);
}

.bp-policy-mark {
  width: 24px;
  height: 24px;
  border: 2px solid var(--bp-blueprint);
  border-radius: 2px;
  position: relative;
}

.bp-policy-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--bp-cyan);
  opacity: 0.4;
}

.bp-policy-link strong {
  font-size: 0.78rem;
  color: var(--bp-ink);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .bp-layout {
    grid-template-columns: 1fr;
  }

  .bp-ruler-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bp-line);
  }

  .bp-rail-line {
    display: none;
  }

  .bp-tab {
    border-radius: 4px;
    padding: 8px 14px;
    background: #fff;
    border-color: var(--bp-line);
  }

  .bp-tab-notch {
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }

  .bp-tab-num {
    display: none;
  }
}

@media (max-width: 768px) {
  .bp-drafting-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .bp-lede {
    margin-left: auto;
    margin-right: auto;
  }

  .bp-stats {
    justify-content: center;
  }

  .bp-title-block {
    text-align: center;
  }

  .bp-story-grid,
  .bp-story-grid-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .bp-registrar-body {
    grid-template-columns: 1fr;
  }

  .bp-compass {
    min-height: 380px;
    max-width: 280px;
  }

  .bp-bearing-e,
  .bp-bearing-w {
    transform: none;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    position: relative;
    max-width: none;
    width: 100%;
  }

  .bp-compass {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: auto;
    padding-top: 80px;
  }

  .bp-compass-ring,
  .bp-compass-core {
    grid-column: 1 / -1;
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 0 auto 12px;
  }

  .bp-bearing-n { position: relative; top: auto; transform: none; grid-column: 1 / -1; }
  .bp-bearing-s { position: relative; bottom: auto; transform: none; grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .bp-sheet {
    padding: 22px 18px 26px;
  }

  .bp-plot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bp-catalog-actions {
    flex-direction: column;
    width: 100%;
  }

  .bp-catalog-actions .bp-btn {
    width: 100%;
  }
}
