/* ============================================================
   INSTALLATLAS shared design system
   One skeleton for the whole family. A section changes exactly
   one thing: --accent (+ --accent-deep). Everything else inherits.

   Built from the ATLAS page's OLED language: warm off-black ink,
   bone "lit" white, hard pixels, scanline texture, two display
   serifs/monos. Wear the device's face.

   Usage in a page <head>:
     <link rel="stylesheet" href="shared/fonts/fonts.css">   (path relative to page)
     <link rel="stylesheet" href="shared/atlas.css">
     <style>:root{ --accent:#ffb627; --accent-deep:#e0901a; }</style>
   ============================================================ */

:root {
  --ink:        #0c0d0a;   /* OLED-off black, faintly warm */
  --ink-2:      #16180f;
  --panel:      #131509;
  --panel-2:    #181a0e;
  --lit:        #f4f1e4;   /* OLED-on "white": bone, not pure white */
  --lit-dim:    #9b9a86;
  --lit-faint:  #797a6a;
  --line:       #2b2d1f;
  --good:       #7bd88f;
  --bad:        #ff6b5e;

  /* Per-section accent. Default = ATLAS amber; pages override. */
  --accent:      #ffb627;
  --accent-deep: #e0901a;

  --r: 3px;
  --wrap: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--lit);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* faint scanline texture, like looking at a screen */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.014) 0px,
    rgba(255,255,255,0.014) 1px,
    transparent 1px,
    transparent 3px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: 'Space Mono', monospace; }
.mono-accent { color: var(--accent); font-family: 'Space Mono', monospace; }
.quiet { color: var(--lit-faint); }
.serif { font-family: 'Fraunces', Georgia, serif; }

/* ---------- pixel divider ---------- */
.pxrule {
  height: 4px; border: none; margin: 0;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px);
}

/* =========================================================
   HEADER / NAV  (shared across every page)
   ========================================================= */
header.site {
  border-bottom: 4px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  background-image: repeating-linear-gradient(0deg,
    rgba(255,255,255,0.014) 0 1px, transparent 1px 3px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; max-width: var(--wrap); margin: 0 auto; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: 'Space Mono', monospace; font-weight: 700;
  letter-spacing: 0.02em; color: var(--lit); font-size: 16px;
}
.brand:hover { text-decoration: none; }
.brand .chip {
  font-size: 10px; color: var(--lit-faint);
  border: 1px solid var(--line); padding: 2px 6px;
  border-radius: var(--r); letter-spacing: 0.08em;
}
.navlinks { display: flex; gap: 22px; font-size: 13px; align-items: center; flex-wrap: wrap; }
.navlinks a { color: var(--lit-dim); letter-spacing: 0.04em; }
.navlinks a:hover { color: var(--accent); text-decoration: none; }
.navlinks a.current { color: var(--lit); }
.navlinks a.current::after {
  content: ""; display: block; height: 2px; background: var(--accent); margin-top: 3px;
}
.navlinks .ext { color: var(--lit-faint); }
@media (max-width: 760px) {
  .navlinks { gap: 14px; font-size: 12px; }
  .brand .chip { display: none; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn, .btn-ghost {
  font-family: 'Space Mono', monospace; font-weight: 700; font-size: 13px;
  letter-spacing: 0.04em; padding: 13px 22px; border-radius: var(--r);
  cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  transition: transform .08s ease, background .15s ease, color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn { background: var(--accent); color: var(--ink); border: 1px solid var(--accent); }
.btn:hover { background: var(--accent-deep); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--lit); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--lit-dim); color: var(--accent); text-decoration: none; }

/* =========================================================
   SECTION SCAFFOLD
   ========================================================= */
section { padding: 60px 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.sec-num { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); font-size: 13px; }
.sec-head h2 {
  font-family: 'Fraunces', serif; font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.01em; color: var(--lit);
}
.sec-head h2 em { font-style: italic; color: var(--accent); }
.sec-sub { color: var(--lit-dim); font-size: 14px; margin-bottom: 34px; max-width: 62ch; }

/* =========================================================
   CARD GRID
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 26px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, transform .1s ease;
}
.card:hover { border-color: var(--lit-faint); transform: translateY(-2px); }
.card .ico { font-family: 'Space Mono', monospace; font-weight: 700; color: var(--accent); font-size: 12px; letter-spacing: 0.1em; }
.card h3 { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.25rem; color: var(--lit); }
.card p { font-size: 13px; color: var(--lit-dim); flex: 1; }
.card a.go { font-family: 'Space Mono', monospace; font-weight: 700; font-size: 12px; letter-spacing: 0.05em; color: var(--accent); }

/* =========================================================
   SPEC STRIP
   ========================================================= */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
@media (max-width: 640px) { .specs { grid-template-columns: repeat(2, 1fr); } }
.spec { padding: 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec:nth-child(4n) { border-right: none; }
.spec .k { font-size: 10px; color: var(--lit-faint); letter-spacing: 0.12em; text-transform: uppercase; font-family: 'Space Mono', monospace; margin-bottom: 6px; }
.spec .v { font-family: 'Fraunces', serif; font-size: 1.35rem; color: var(--lit); font-weight: 600; }
.spec .v small { font-size: 0.7em; color: var(--lit-dim); }

/* =========================================================
   CALLOUT
   ========================================================= */
.callout {
  background: var(--ink); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: var(--r);
  padding: 14px 16px; font-size: 13px; color: var(--lit-dim); margin-top: 22px;
}
.callout strong { color: var(--lit); }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site { border-top: 4px solid var(--line); padding: 40px 0 60px; color: var(--lit-dim); font-size: 13px; line-height: 1.8; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-grid a { color: var(--lit); }
.foot-grid a:hover { color: var(--accent); }
.foot-face { width: 44px; height: 26px; opacity: 0.5; }
.px { fill: var(--lit); }
