/* ==========================================================================
   [UNMET] — Digital Stone Tablet Stylesheet
   Design: Option C — Balanced Synthesis (Death Stranding Aesthetic)
   Ascetic, solitary, utilitarian monument.
   ========================================================================== */

/* Modern CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-color: #08090b;
  --bg-surface: rgba(14, 16, 20, 0.65);
  --text-main: #e3e5e8;
  --text-muted: #878a90;
  --text-dim: #50535a;
  
  /* Death Stranding Signature Palette */
  --accent-chiral: #df9b35;
  --accent-chiral-dim: rgba(223, 155, 53, 0.25);
  --accent-chiral-glow: rgba(223, 155, 53, 0.12);
  --accent-cyan: #26a69a;
  --accent-cyan-dim: rgba(38, 166, 154, 0.2);
  --border-subtle: #191b20;
  --border-chiral: rgba(223, 155, 53, 0.18);
  
  --font-stack: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --line-height: 1.75;
  --max-width: 800px;
}

html {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: var(--line-height);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 4rem 1.5rem 5rem;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% 0%, #11141a 0%, #08090b 65%);
  color: var(--text-main);
}

::selection {
  background-color: var(--accent-chiral);
  color: var(--bg-color);
}

/* Outer Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Odradek Visor / Terminal Frame */
.terminal-frame {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-chiral);
  padding: 3rem 2.75rem 3.5rem;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
}

/* Corner Reticles (Угловые визиры сканера Одрадека) */
.reticle {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.reticle.top-left {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent-chiral);
  border-left: 2px solid var(--accent-chiral);
}

.reticle.top-right {
  top: -1px;
  right: -1px;
  border-top: 2px solid var(--accent-chiral);
  border-right: 2px solid var(--accent-chiral);
}

.reticle.bottom-left {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid var(--accent-chiral);
  border-left: 2px solid var(--accent-chiral);
}

.reticle.bottom-right {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--accent-chiral);
  border-right: 2px solid var(--accent-chiral);
}

/* Terminal HUD Status Bar */
.terminal-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-bottom: 1.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px dashed var(--border-chiral);
}

.hud-item {
  display: flex;
  align-items: center;
}

.hud-label {
  color: var(--accent-chiral);
  margin-right: 0.35rem;
}

.hud-center {
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.status-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-cyan);
  border-radius: 50%;
  margin-right: 0.45rem;
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* Header & Clan Tag */
.header {
  margin-bottom: 4rem;
  text-align: center;
}

.clan-tag {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-main);
  text-transform: uppercase;
  text-shadow: 0 0 25px var(--accent-chiral-glow);
}

/* Sections */
.section {
  margin-bottom: 3rem;
}

/* Doctrine Grid (The Code & The Rules) */
.doctrine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 2.75rem;
}

.creed h2,
.absences h2 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.creed h2::before,
.absences h2::before {
  content: "◈";
  color: var(--accent-chiral);
  font-size: 0.75rem;
}

.creed p {
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.creed p:last-child {
  margin-bottom: 0;
}

.absences p {
  margin-bottom: 0.85rem;
  color: var(--text-muted);
}

.absences p:last-child {
  margin-bottom: 0;
}

/* Acceptance Clause */
.acceptance {
  margin-bottom: 3.5rem;
  padding: 1.15rem 1.4rem;
  background: var(--accent-chiral-glow);
  border-left: 2px solid var(--accent-chiral);
}

.acceptance p {
  color: var(--text-main);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* Solemn Divider */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 4.5rem 0;
  color: var(--accent-chiral);
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  user-select: none;
  opacity: 0.75;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-chiral-dim),
    transparent
  );
}

/* Manifestation Section */
.manifestation h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-chiral);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.manifestation h2::before {
  content: "[!]";
  font-size: 0.85rem;
  color: var(--accent-chiral);
}

.manifestation-intro {
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* The Chiral Strand (Хиральная нить манифестации) */
.manifestation-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  counter-reset: order;
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 4.5rem;
}

/* Continuous Chiral Strand Cord */
.manifestation-list::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--accent-chiral) 0%,
    var(--accent-chiral-dim) 50%,
    var(--accent-chiral) 100%
  );
  box-shadow: 0 0 8px var(--accent-chiral-glow);
}

.manifestation-item {
  position: relative;
  counter-increment: order;
  transition: transform 0.2s ease;
}

/* Chiral Knot (Узел связи на нити) */
.manifestation-item::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  margin-left: -3px;
  background-color: var(--bg-color);
  border: 2px solid var(--accent-chiral);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-chiral);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.manifestation-item:hover::before {
  background-color: var(--accent-chiral);
  transform: scale(1.3);
}

.entry-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 0.65rem;
}

/* Terminal Order Counter */
.entry-title::before {
  content: "ORDER // 0" counter(order) " — ";
  color: var(--accent-chiral);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.manifestation-item p {
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.manifestation-item p:last-child {
  margin-bottom: 0;
}

/* Epilogue / Horizon Section */
.epilogue {
  border-top: 1px solid var(--border-chiral);
  padding-top: 3.5rem;
  position: relative;
}

.epilogue::before {
  content: "HORIZON // CONTINUATION";
  position: absolute;
  top: -0.65rem;
  left: 1rem;
  background-color: #0c0e12;
  padding: 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent-chiral);
}

.epilogue p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.epilogue p:last-child {
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

/* Terminal Footer */
.terminal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 4.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border-chiral);
}

/* Responsive Adjustments */
@media (max-width: 680px) {
  body {
    padding: 2.5rem 1rem 3.5rem;
  }

  .terminal-frame {
    padding: 2rem 1.25rem 2.5rem;
  }

  .terminal-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
  }

  .hud-center {
    display: none;
  }

  .clan-tag {
    font-size: 1.85rem;
    letter-spacing: 0.2em;
  }

  .doctrine-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .divider {
    margin: 3.5rem 0;
  }

  .manifestation-list {
    padding-left: 1.5rem;
    gap: 2.25rem;
    margin-bottom: 3.5rem;
  }

  .manifestation-item::before {
    left: -1.5rem;
  }

  .entry-title {
    font-size: 0.95rem;
  }

  .epilogue {
    padding-top: 2.5rem;
  }

  .terminal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 3.5rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff;
    color: #111111;
    padding: 0;
  }

  .terminal-frame {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .reticle,
  .terminal-hud,
  .terminal-footer {
    display: none;
  }

  .clan-tag,
  .manifestation h2,
  .entry-title,
  .creed h2,
  .absences h2 {
    color: #000000;
  }

  .creed p,
  .absences p,
  .manifestation-item p,
  .epilogue p {
    color: #222222;
  }

  .manifestation-list::before {
    background: #888888;
  }

  .manifestation-item::before {
    border-color: #000000;
    background: #ffffff;
  }
}
