/* Takin (תקין) - Base Layout, Shell & Typography (Editorial Authority)
   Strictly < 600 lines per Universal Clean Code Iron Rule #1 */

:root {
  --bg-canvas: #ffffff;
  --bg-paper: #faf9f6;
  --bg-rail: #f7f6f2;
  --bg-subtle: #f1f3f5;
  --text-pure: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;
  --border-heavy: #111827;
  --border-medium: #d1d5db;
  --border-light: #e5e7eb;
  --accent-green: #00c853;
  --accent-green-dark: #008f39;
  --accent-navy: #0f2942;
  --accent-warn: #d97706;
  --font-serif: 'Frank Ruhl Libre', serif;
  --font-display: 'Rubik', sans-serif;
  --font-body: 'Assistant', 'Rubik', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-pure);
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Subtle Architectural Grid Pattern */
.swiss-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(17, 24, 39, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 24, 39, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* --- Top System Status Bar --- */
.system-top-bar {
  border-bottom: 2px solid var(--border-heavy);
  padding: 0.85rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-anchor-swiss {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-pure);
}

.brand-logo-bracket {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-heavy);
  object-fit: cover;
  flex-shrink: 0;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-green-dark);
  font-weight: 600;
}

.pulse-led {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulseLed 2s infinite ease-in-out;
}

@keyframes pulseLed {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

/* --- Two-Column Layout --- */
.swiss-page-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 65px);
}

/* --- Right Vertical Index Rail --- */
.swiss-sidebar-rail {
  border-left: 2px solid var(--border-heavy);
  background: var(--bg-rail);
  padding: 3rem 2rem;
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.rail-section-tag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-medium);
}

.rail-nav-list {
  list-style: none;
}

.rail-nav-list li {
  margin-bottom: 1.25rem;
}

.rail-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  color: var(--text-pure);
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
}

.rail-nav-link:hover {
  border-color: var(--border-heavy);
  background: #ffffff;
}

.rail-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.rail-item-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.rail-telemetry-box {
  border-top: 1px solid var(--border-medium);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Main Canvas --- */
.swiss-main-canvas {
  padding: 4.5rem 5rem 6rem;
  max-width: 1040px;
}

.crosshair-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

/* Hero Section */
.hero-tag-block {
  display: inline-block;
  background: var(--accent-navy);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  margin-bottom: 1.75rem;
  border-radius: 2px;
}

.hero-main-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
  color: var(--text-pure);
}

.hero-main-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 800;
  color: #2b394a;
  display: block;
  margin-top: 0.5rem;
  line-height: 1.25;
}

.hero-lead-text {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.75;
  color: #334155;
  max-width: 820px;
  margin-bottom: 2.75rem;
}

/* Seal Display in Hero */
.hero-seal-display {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--border-heavy);
  background: var(--bg-paper);
  margin-bottom: 2.75rem;
  max-width: 680px;
  box-shadow: 4px 4px 0px rgba(17, 24, 39, 0.15);
}

.hero-official-seal-img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--border-heavy);
  object-fit: cover;
  flex-shrink: 0;
}

.seal-meta-caption {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-pure);
}

.seal-meta-caption strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 0.25rem;
}

/* Metric Strip */
.metric-hud-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 2px solid var(--border-heavy);
  border-bottom: 2px solid var(--border-heavy);
  margin-bottom: 3rem;
  background: #ffffff;
}

.metric-hud-cell {
  padding: 2rem 1.5rem;
}

.metric-hud-cell:first-child {
  border-left: 2px solid var(--border-heavy);
  padding-left: 2.5rem;
}

.metric-giant-num {
  font-size: clamp(3.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-family: var(--font-display);
  color: var(--text-pure);
}

.metric-hud-label {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.65rem;
}

/* Action Buttons */
.cta-button-strip {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 4.5rem;
}

.btn-swiss-exec {
  background: var(--text-pure);
  color: #ffffff;
  padding: 1.15rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-display);
  text-decoration: none;
  border: 2px solid var(--text-pure);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.btn-swiss-exec:hover {
  background: #ffffff;
  color: var(--text-pure);
}

.btn-swiss-spec {
  background: transparent;
  color: var(--text-pure);
  padding: 1.15rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: var(--font-display);
  text-decoration: none;
  border: 2px solid var(--text-pure);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.btn-swiss-spec:hover {
  background: var(--text-pure);
  color: #ffffff;
}

/* Statutory Footer */
.swiss-statutory-footer {
  margin-top: 7rem;
  border-top: 2px solid var(--border-heavy);
  padding: 3.5rem 0 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-light);
}

.footer-nav-link {
  color: var(--text-pure);
  text-decoration: underline;
  font-weight: 700;
}

/* Responsive Mobile Layout */
@media (max-width: 960px) {
  .swiss-page-wrap {
    grid-template-columns: 1fr;
  }
  .swiss-sidebar-rail {
    position: static;
    height: auto;
    border-left: none;
    border-bottom: 2px solid var(--border-heavy);
    padding: 2rem 1.5rem;
  }
  .swiss-main-canvas {
    padding: 2.5rem 1.5rem 4rem;
  }
  .metric-hud-strip {
    grid-template-columns: 1fr;
  }
  .metric-hud-cell:first-child {
    border-left: none;
    border-bottom: 2px solid var(--border-heavy);
    padding-left: 1rem;
  }
  .system-top-bar {
    padding: 0.75rem 1.25rem;
  }
}
