/* SharetoBoard ecosystem navigation and product-family presentation. */

.nav-menu {
  position: relative;
}

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 140ms ease;
}

.nav-menu[open] summary {
  color: var(--text);
}

.nav-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-menu summary:focus-visible,
.nav-menu-panel a:focus-visible,
.product-link:focus-visible {
  outline: 3px solid var(--brand-2);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 0.8rem);
  left: 50%;
  z-index: 60;
  width: min(320px, calc(100vw - 2rem));
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(7, 21, 38, 0.98);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.nav-menu-panel::before {
  content: "";
  position: absolute;
  top: -0.45rem;
  left: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #071526;
  transform: translateX(-50%) rotate(45deg);
}

.nav .nav-menu-panel a {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.05rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.nav .nav-menu-panel a:hover,
.nav .nav-menu-panel a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.06);
}

.nav .nav-menu-panel a strong {
  color: var(--text);
  font-size: 0.9rem;
}

.nav .nav-menu-panel a span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
}

.ecosystem-section {
  position: relative;
  overflow: hidden;
}

.ecosystem-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 20%, rgba(14, 181, 173, 0.12), transparent 38%);
}

.ecosystem-section .shell {
  position: relative;
  z-index: 1;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.ecosystem-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(160deg, rgba(17, 43, 66, 0.94), rgba(11, 31, 49, 0.96));
  box-shadow: 0 16px 34px rgba(1, 5, 10, 0.24);
}

.ecosystem-card-primary {
  border-color: rgba(255, 122, 43, 0.62);
  background: linear-gradient(160deg, rgba(77, 42, 24, 0.62), rgba(17, 43, 66, 0.96));
  box-shadow: 0 0 0 1px rgba(255, 122, 43, 0.14), 0 18px 38px rgba(1, 5, 10, 0.3);
}

.product-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.product-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ecosystem-card-primary .product-icon {
  border-color: rgba(255, 122, 43, 0.52);
  color: #071526;
  background: #ff9e58;
}

.product-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-align: right;
  text-transform: uppercase;
}

.product-role {
  margin: 0 0 0.25rem;
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ecosystem-card h3 {
  margin: 0 0 0.7rem;
  color: var(--text);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
}

.ecosystem-card > p:not(.product-role) {
  margin: 0 0 1.35rem;
  color: var(--muted);
}

.product-link {
  margin-top: auto;
  color: var(--brand-2);
  font-weight: 800;
}

.ecosystem-card-primary .product-link {
  color: #ffad73;
}

.ecosystem-boundary {
  max-width: 880px;
  margin: 1.35rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--brand-2);
  border-radius: 0.7rem;
  background: rgba(14, 181, 173, 0.07);
  color: var(--muted);
  font-size: 0.9rem;
}

.ecosystem-boundary strong {
  color: var(--text);
}

.product-page-hero {
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.product-page-hero h1 {
  max-width: 940px;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.product-page-hero .lead {
  max-width: 760px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.status-banner {
  max-width: 900px;
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 184, 77, 0.34);
  border-radius: 0.85rem;
  background: rgba(255, 184, 77, 0.08);
  color: #ffd9a3;
}

.architecture-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(2, 8, 14, 0.32);
}

.architecture-node {
  position: relative;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
}

.architecture-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -1.55rem;
  color: var(--brand-2);
  font-size: 1.35rem;
  font-weight: 800;
  transform: translateY(-50%);
}

.architecture-node strong,
.architecture-node span {
  display: block;
}

.architecture-node span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.tool-item {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
}

.tool-item code {
  color: #8de7df;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.tool-item p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.boundary-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
}

.boundary-card h3 {
  color: var(--brand-2);
}

.boundary-card.boundary-card-not h3 {
  color: #ffad73;
}

.page-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.page-section + .page-section {
  border-top: 1px solid var(--line);
}

.page-section h2 {
  max-width: 780px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.page-section .lead {
  max-width: 760px;
}

.article-shell {
  width: min(820px, calc(100vw - 2rem));
  margin: 0 auto;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.article-body {
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.article-body h2 {
  margin-top: 2.6rem;
}

.article-body h3 {
  margin-top: 1.8rem;
}

.article-body p,
.article-body li {
  color: var(--muted);
}

.article-body strong,
.article-body h2,
.article-body h3 {
  color: var(--text);
}

.code-block,
.text-diagram {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(2, 8, 14, 0.68);
  color: #bfeeea;
  font: 0.86rem/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
}

.evidence-note {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--warn);
  border-radius: 0.7rem;
  background: rgba(255, 184, 77, 0.08);
  color: #ffd9a3;
}

.status-grid,
.manual-grid,
.paper-grid,
.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.status-card,
.manual-card,
.paper-card,
.skill-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
}

.status-card h3,
.manual-card h3,
.paper-card h3,
.skill-card h3 {
  margin-top: 0.45rem;
}

.status-card p,
.manual-card p,
.paper-card p,
.skill-card p {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill.ready {
  border-color: rgba(23, 192, 122, 0.5);
  color: #8ee8bd;
  background: rgba(23, 192, 122, 0.08);
}

.status-pill.gated {
  border-color: rgba(255, 184, 77, 0.5);
  color: #ffd9a3;
  background: rgba(255, 184, 77, 0.08);
}

.status-pill.preview {
  border-color: rgba(14, 181, 173, 0.5);
  color: #8de7df;
  background: rgba(14, 181, 173, 0.08);
}

.check-list,
.plain-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
}

.doc-nav a {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.doc-nav a:hover,
.doc-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.comparison-table td:first-child,
.comparison-table th:first-child {
  font-weight: 750;
  color: var(--text);
}

.pricing-table td:nth-child(2) {
  white-space: nowrap;
  color: #8ee8bd;
  font-weight: 800;
}

.three-entry-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.three-entry-flow > article {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.025);
}

.three-entry-flow p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 940px) {
  .ecosystem-grid,
  .tool-grid,
  .three-entry-flow {
    grid-template-columns: 1fr;
  }

  .architecture-flow {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .architecture-node:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -1.7rem;
    transform: translateX(50%);
  }
}

@media (max-width: 700px) {
  .nav-menu[open] {
    flex: 1 0 100%;
  }

  .nav-menu-panel {
    position: static;
    width: 100%;
    margin-top: 0.65rem;
    transform: none;
  }

  .nav-menu-panel::before {
    display: none;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .status-grid,
  .manual-grid,
  .paper-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .product-card-topline {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu summary::after {
    transition: none;
  }
}
