/* SecuMap Platform Services — shared public page styles (nav aligned with MainSite) */

:root {
  --bg-start: #0b1220;
  --bg-end: #0f172a;
  --text: #f8fafc;
  --muted: rgba(248, 250, 252, 0.7);
  --accent: #00d0ff;
  --accent-strong: #00a0f2;
  --border: rgba(255, 255, 255, 0.08);
  --space-page-inline: 1.5rem;
  font-family: Arial, Helvetica, sans-serif;
}

@media (max-width: 768px) {
  :root {
    --space-page-inline: 1.125rem;
  }
}

@media (max-width: 480px) {
  :root {
    --space-page-inline: 1rem;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, var(--bg-start), var(--bg-end));
  min-height: 100vh;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.container-narrow {
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--space-page-inline);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.cyber-grid {
  position: fixed;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(14, 165, 233, 0.1) 1px, transparent 1px),
    linear-gradient(rgba(14, 165, 233, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridMove 10s linear infinite;
}

@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 40px 40px; }
}

.page-main {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.page-main--narrow {
  max-width: 820px;
}

.page-main--home {
  max-width: 1080px;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.page-hero a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.page-hero a:hover {
  color: #7dd3fc;
}

.meta-line {
  font-size: 0.875rem;
  color: #64748b;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(8px);
}

.release-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.release-item {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.release-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.release-item a {
  color: #38bdf8;
  text-decoration: none;
}

.release-item a:hover {
  text-decoration: underline;
}

.release-meta {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.release-desc {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.925rem;
  line-height: 1.5;
}

.muted { color: #64748b; }
.error { color: #f87171; }

.back-link {
  margin-bottom: 1rem;
}

.back-link a {
  color: #94a3b8;
  text-decoration: none;
}

.back-link a:hover {
  color: #38bdf8;
}

.release-article h1 {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.prose h1, .prose h2, .prose h3 {
  margin: 1.25rem 0 0.65rem;
  color: #e2e8f0;
}

.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; color: #38bdf8; }
.prose h3 { font-size: 1.05rem; }

.prose p, .prose li {
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.prose ul {
  margin: 0.5rem 0 1rem 1.25rem;
}

.prose code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.prose hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.25rem 0;
}

.prose-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.prose th {
  background: rgba(56, 189, 248, 0.12);
  color: #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
}

.prose tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.prose td code {
  white-space: nowrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
}

/* Homepage — channel snapshot + activity */
.home-section {
  margin-top: 2.5rem;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.35rem;
  color: #e2e8f0;
  margin-bottom: 0.35rem;
}

.page-main--home .channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.page-main--home .activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 767px) {
  .page-main--home .channel-grid,
  .page-main--home .activity-grid {
    grid-template-columns: 1fr;
  }
}

.channel-card h3 {
  font-size: 1.05rem;
  color: #38bdf8;
  margin-bottom: 0.35rem;
}

.channel-card__desc {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
  line-height: 1.45;
}

.channel-card__version {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.channel-card__date {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.channel-card__links {
  margin-top: 0.65rem;
}

.channel-card__links a {
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.875rem;
}

.channel-card__links a:hover {
  text-decoration: underline;
}

.channel-card__note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.45;
}

.channel-card__note a {
  color: #38bdf8;
  text-decoration: none;
}

.channel-card__note a:hover {
  text-decoration: underline;
}

.activity-panel {
  padding: 1.5rem;
}

.activity-meta {
  margin-bottom: 1rem;
}

.activity-stat {
  text-align: center;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.activity-stat__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.status-panel {
  padding: 1.5rem;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-banner__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: #64748b;
}

.status-banner--operational .status-banner__dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-banner--degraded .status-banner__dot {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.status-banner--unavailable .status-banner__dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.status-banner__text {
  font-weight: 600;
  color: #e2e8f0;
}

.status-meta {
  margin-bottom: 1rem;
}

.status-meta--stale {
  color: #f59e0b;
}

.page-main--home .status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 767px) {
  .page-main--home .status-grid {
    grid-template-columns: 1fr;
  }
}

.status-card {
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.status-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-badge--operational {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.status-badge--degraded {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-badge--unavailable {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.status-card__checked {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.status-card__meta,
.status-card__message {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.status-card__message {
  color: #fbbf24;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #fff;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}
