/* =========================================================
   features.css — Feature page layout & component styles
   ========================================================= */

/* Feature page two-column layout */
.feature-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 2rem 0 5rem;
}

@media (max-width: 1024px) {
  .feature-layout { grid-template-columns: 1fr; }
  .feature-toc { display: none; }
}

/* ── TOC Sidebar ── */
.feature-toc {
  position: sticky;
  top: 5.5rem;
  background: var(--obsidian-surface);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.toc-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 1rem;
}

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

.toc-list li { margin-bottom: 0.375rem; }

.toc-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 150ms ease;
  line-height: 1.4;
  display: block;
  padding: 0.125rem 0;
}

.toc-list a:hover,
.toc-list a.active { color: var(--agent-blue); }

.toc-sub {
  padding-left: 0.875rem;
  border-left: 1px solid var(--obsidian-stroke);
  margin-top: 0.25rem;
}

.toc-divider {
  border: none;
  border-top: 1px solid var(--obsidian-stroke);
  margin: 1rem 0;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 1.25rem 0 0;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.breadcrumb a:hover { color: var(--agent-blue); }
.breadcrumb-sep { color: var(--obsidian-stroke); }

/* ── Feature Hero ── */
.feature-hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--obsidian-stroke);
  margin-bottom: 2.5rem;
}

.feature-hero h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  margin-bottom: 0.875rem;
}

.feature-hero .lead {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-stat strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--agent-blue);
  font-family: var(--font-mono);
}

.hero-stat span {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Category Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.badge-intelligence { background: rgba(59,130,246,0.12); color: var(--agent-blue); border: 1px solid rgba(59,130,246,0.3); }
.badge-resources     { background: rgba(168,85,247,0.12); color: #A855F7;           border: 1px solid rgba(168,85,247,0.3); }
.badge-operations    { background: rgba(245,158,11,0.12); color: var(--warn-amber); border: 1px solid rgba(245,158,11,0.3); }
.badge-administration{ background: rgba(34,197,94,0.12);  color: var(--active-green);border: 1px solid rgba(34,197,94,0.3); }

/* ── Content Sections ── */
.section {
  margin-bottom: 3rem;
  scroll-margin-top: 6rem;
}

.section > h2 {
  font-size: 1.375rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--obsidian-stroke);
  margin-bottom: 1.25rem;
}

.section h3 {
  font-size: 1.0625rem;
  margin-top: 1.75rem;
  margin-bottom: 0.625rem;
  color: var(--foreground);
}

.section p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.875rem;
}

.section ul, .section ol {
  color: var(--muted);
  line-height: 1.7;
  padding-left: 1.5rem;
  margin-bottom: 0.875rem;
}

.section li { margin-bottom: 0.375rem; }

/* ── Callout Blocks ── */
.callout {
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 3px solid;
  display: flex;
  gap: 0.75rem;
}

.callout-label {
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
  display: block;
}

.callout-body { flex: 1; }

.callout-body p { margin: 0; font-size: 0.9rem; }

.callout-info    { background: rgba(59,130,246,0.07);  border-color: var(--agent-blue);   color: #93c5fd; }
.callout-warning { background: rgba(245,158,11,0.07);  border-color: var(--warn-amber);   color: #fcd34d; }
.callout-tip     { background: rgba(34,197,94,0.07);   border-color: var(--active-green); color: #86efac; }
.callout-danger  { background: rgba(239,68,68,0.07);   border-color: var(--error-red);    color: #fca5a5; }

/* ── Capability Grid ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.cap-card {
  background: var(--obsidian-elevated);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: border-color 150ms ease;
}

.cap-card:hover { border-color: var(--agent-blue); }

.cap-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--obsidian-base);
  border: 1px solid var(--obsidian-stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.cap-card h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.cap-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Property Table ── */
.prop-table-wrap {
  background: var(--obsidian-surface);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1rem 0;
}

.prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.prop-table th {
  text-align: left;
  padding: 0.625rem 1rem;
  background: var(--obsidian-base);
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--obsidian-stroke);
}

.prop-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(51,65,85,0.4);
  color: var(--foreground);
  vertical-align: top;
  line-height: 1.5;
}

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

.prop-table td:first-child {
  font-family: var(--font-mono);
  color: var(--agent-blue);
  font-size: 0.8rem;
  white-space: nowrap;
}

.prop-table td .prop-desc { color: var(--muted); font-size: 0.8rem; display: block; margin-top: 0.2rem; }

/* ── Inline tags ── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  background: var(--obsidian-elevated);
  border: 1px solid var(--obsidian-stroke);
  color: var(--muted);
  vertical-align: middle;
}

.tag-required { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.tag-optional { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: #86efac; }
.tag-default  { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }
.tag-warn     { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fcd34d; }

/* ── Step List ── */
.step-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  counter-reset: step-counter;
}

.step-list > li {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(51,65,85,0.35);
}

.step-list > li:last-child { border-bottom: none; }

.step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 50%;
  background: var(--agent-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}

.step-body strong {
  display: block;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--foreground);
}

.step-body p { color: var(--muted); font-size: 0.875rem; margin: 0; }

/* ── Related Features ── */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.related-card {
  background: var(--obsidian-elevated);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: var(--foreground);
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.related-card:hover {
  border-color: var(--agent-blue);
  background: rgba(59,130,246,0.05);
}

.related-card .rc-icon { font-size: 1.125rem; flex-shrink: 0; }
.related-card .rc-name { font-size: 0.8125rem; font-weight: 500; }

/* ── Hub page ── */
.hub-hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hub-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.hub-hero p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hub-section {
  margin-bottom: 4rem;
}

.hub-section-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--obsidian-stroke);
  margin-bottom: 1.5rem;
}

.hub-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hub-section-header h2 {
  font-size: 1.25rem;
  margin: 0;
}

.hub-section-header p {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.hub-card {
  background: var(--obsidian-elevated);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.875rem;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--foreground);
  transition: all 180ms ease;
  display: flex;
  flex-direction: column;
}

.hub-card:hover {
  border-color: var(--agent-blue);
  box-shadow: 0 0 20px rgba(59,130,246,0.08);
  transform: translateY(-2px);
}

.hub-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.hub-card h3 { font-size: 1rem; margin-bottom: 0.375rem; }

.hub-card p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.hub-card-arrow {
  margin-top: 1rem;
  color: var(--agent-blue);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Nav additions ── */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--obsidian-stroke);
  color: var(--foreground);
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links   { display: none !important; }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem;
  border-top: 1px solid var(--obsidian-stroke);
  background: var(--obsidian-surface);
  gap: 0;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  color: var(--foreground);
  text-decoration: none;
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid rgba(51,65,85,0.35);
}

.mobile-nav a:last-child { border-bottom: none; }

/* ── Arch diagram (mono art) ── */
.arch-block {
  background: var(--obsidian-base);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.5rem;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  overflow-x: auto;
  line-height: 1.6;
  white-space: pre;
}

.arch-block .arch-label { color: var(--agent-blue); }
.arch-block .arch-active { color: var(--active-green); }
.arch-block .arch-warn   { color: var(--warn-amber); }

/* ── Permission list ── */
.perm-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.perm-list li {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  font-size: 0.875rem;
}

.perm-list .perm-key {
  font-family: var(--font-mono);
  color: var(--agent-blue);
  font-size: 0.8rem;
  white-space: nowrap;
}

.perm-list .perm-desc { color: var(--muted); }

/* ── Two-col helper ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* ── Divider ── */
.hr { border: none; border-top: 1px solid var(--obsidian-stroke); margin: 2.5rem 0; }

/* ── Logo link ── */
.logo-link { text-decoration: none; }

/* ── App Screenshot ── */
.screenshot-section { margin-top: 2.5rem; }

.screenshot-frame {
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(59,130,246,0.1);
  background: var(--obsidian-surface);
  margin-top: 1rem;
}

.screenshot-frame .frame-bar {
  background: var(--obsidian-elevated);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--obsidian-stroke);
}

.screenshot-frame .frame-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--obsidian-stroke);
}
.screenshot-frame .frame-dot:nth-child(1) { background: #EF4444; }
.screenshot-frame .frame-dot:nth-child(2) { background: #F59E0B; }
.screenshot-frame .frame-dot:nth-child(3) { background: #22C55E; }

.screenshot-frame .frame-url {
  flex: 1;
  background: var(--obsidian-base);
  border: 1px solid var(--obsidian-stroke);
  border-radius: 0.375rem;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}
