/* ElementorRAM ARCH-05 / M4 Stack Matrix */
:root {
  --elm-bg: #f5f8fc;
  --elm-surface: #ffffff;
  --elm-surface-alt: #e9eff8;
  --elm-ink: #0f172a;
  --elm-muted: #475569;
  --elm-accent: #1d4ed8;
  --elm-accent-dark: #1e40af;
  --elm-accent-soft: #dbeafe;
  --elm-border: #cbd5e1;
  --elm-ok: #047857;
  --elm-ok-soft: #d1fae5;
  --elm-warn: #b45309;
  --elm-warn-soft: #fef3c7;
  --elm-danger: #b91c1c;
  --elm-danger-soft: #fee2e2;
  --elm-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --elm-mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--elm-bg);
  color: var(--elm-ink);
  font-family: var(--elm-sans);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: clip;
}

a { color: var(--elm-accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--elm-accent-dark); }
img, svg { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--elm-mono); font-size: 0.86rem; }

.elm-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--elm-accent);
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-weight: 700;
  z-index: 100;
}
.elm-skip:focus { left: 0.75rem; top: 0.75rem; }

.elm-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.2rem; }
.elm-mono { font-family: var(--elm-mono); font-size: 0.85rem; }
.elm-muted { color: var(--elm-muted); }
.elm-hidden { display: none; }

/* Masthead */
.elm-masthead { background: var(--elm-surface); border-bottom: 1px solid var(--elm-border); }
.elm-masthead-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 0;
}
.elm-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--elm-ink);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: -0.015em;
}
.elm-monogram {
  display: inline-grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 7px;
  background: var(--elm-ink);
  color: #ffffff;
  font-family: var(--elm-mono);
  font-size: 0.82rem;
  font-weight: 800;
  border: 2px solid var(--elm-accent);
}
.elm-nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: center; font-size: 0.92rem; }
.elm-nav a {
  text-decoration: none;
  color: var(--elm-muted);
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
}
.elm-nav a[aria-current="page"], .elm-nav a:hover {
  color: var(--elm-accent);
  background: var(--elm-accent-soft);
}
.elm-disclosure-bar {
  background: var(--elm-surface-alt);
  border-top: 1px solid var(--elm-border);
  font-size: 0.8rem;
  color: var(--elm-muted);
  padding: 0.42rem 1.2rem;
  text-align: center;
}

.elm-main { padding: 1.5rem 0 5.5rem; }
.elm-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  font-size: 0.83rem;
  color: var(--elm-muted);
  margin-bottom: 1rem;
}

/* Directory Matrix Hero */
.elm-hero, .elm-hero-matrix {
  background: var(--elm-surface);
  border: 1px solid var(--elm-border);
  border-radius: 12px;
  padding: 1.55rem;
  margin-bottom: 1.45rem;
}
.elm-hero-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}
@media (min-width: 880px) {
  .elm-hero-matrix { grid-template-columns: 1.55fr 1fr; align-items: start; }
}
.elm-eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  font-family: var(--elm-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--elm-accent);
  background: var(--elm-accent-soft);
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}
.elm-hero h1, .elm-hero-matrix h1 {
  margin: 0.15rem 0 0.65rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.elm-lead { margin: 0 0 1rem; color: var(--elm-muted); max-width: 72ch; }

.elm-hero-rail {
  background: var(--elm-surface-alt);
  border: 1px solid var(--elm-border);
  border-radius: 10px;
  padding: 1.05rem;
}
.elm-hero-rail h2 { margin: 0 0 0.7rem; font-size: 0.96rem; color: var(--elm-ink); }
.elm-spec-list { list-style: none; padding: 0; margin: 0; }
.elm-spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--elm-border);
  font-size: 0.86rem;
}
.elm-spec-list li:last-child { border-bottom: none; }
.elm-spec-list span { color: var(--elm-muted); }
.elm-spec-list strong { font-family: var(--elm-mono); color: var(--elm-ink); }

/* Buttons & Filter Pills */
.elm-cta-row { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.9rem; }
.elm-btn-primary, .elm-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}
.elm-btn-primary {
  background: var(--elm-accent);
  color: #ffffff;
  border: 1px solid var(--elm-accent);
}
.elm-btn-primary:hover { background: var(--elm-accent-dark); color: #ffffff; }
.elm-btn-secondary {
  background: var(--elm-surface);
  color: var(--elm-accent);
  border: 1px solid var(--elm-border);
}
.elm-btn-secondary:hover { background: var(--elm-accent-soft); color: var(--elm-accent-dark); border-color: var(--elm-accent); }

.elm-preset-row, .elm-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.elm-preset-btn, .elm-filter-btn {
  border: 1px solid var(--elm-border);
  background: var(--elm-surface-alt);
  color: var(--elm-ink);
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.elm-preset-btn[aria-pressed="true"], .elm-filter-btn[aria-pressed="true"] {
  background: var(--elm-accent);
  color: #ffffff;
  border-color: var(--elm-accent);
}

/* Interactive Stack Matrix & Calculator */
.elm-calc-panel {
  background: var(--elm-surface);
  border: 1px solid var(--elm-border);
  border-radius: 12px;
  padding: 1.45rem;
  margin-bottom: 1.5rem;
}
.elm-calc-head h2 { margin: 0 0 0.45rem; font-size: 1.35rem; }
.elm-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem 1.05rem;
  margin-bottom: 1.2rem;
}
.elm-field { display: flex; flex-direction: column; gap: 0.3rem; }
.elm-field label { font-size: 0.84rem; font-weight: 700; color: var(--elm-ink); }
.elm-field input, .elm-field select {
  width: 100%;
  padding: 0.52rem 0.68rem;
  border: 1px solid var(--elm-border);
  border-radius: 8px;
  background: var(--elm-surface);
  color: var(--elm-ink);
  font-family: var(--elm-sans);
  font-size: 0.92rem;
}
.elm-field input:focus, .elm-field select:focus {
  outline: 2px solid var(--elm-accent-soft);
  border-color: var(--elm-accent);
}

.elm-stack-panel {
  background: var(--elm-surface-alt);
  border: 1px solid var(--elm-border);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  margin-bottom: 1.1rem;
}
.elm-stack-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}
.elm-stack-bar {
  display: flex;
  width: 100%;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid var(--elm-border);
}
.elm-seg { height: 100%; }
.elm-seg-fpm { background: #1d4ed8; }
.elm-seg-opcache { background: #0284c7; }
.elm-seg-redis { background: #047857; }
.elm-seg-db { background: #b45309; }
.elm-seg-os { background: #475569; }
.elm-seg-free { background: #e2e8f0; }

.elm-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--elm-ink);
}
.elm-leg-item { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--elm-mono); }
.elm-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.elm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.2rem;
}
.elm-kpi-card {
  background: var(--elm-surface-alt);
  border: 1px solid var(--elm-border);
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
}
.elm-kpi-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--elm-muted);
  font-weight: 700;
}
.elm-kpi-card dd {
  margin: 0.2rem 0 0;
  font-family: var(--elm-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--elm-ink);
}

/* Badges */
.elm-badge {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-family: var(--elm-mono);
  font-size: 0.75rem;
  font-weight: 700;
}
.elm-badge-fit { background: var(--elm-ok-soft); color: var(--elm-ok); }
.elm-badge-tight { background: var(--elm-warn-soft); color: var(--elm-warn); }
.elm-badge-oom { background: var(--elm-danger-soft); color: var(--elm-danger); }

/* Tables */
.elm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--elm-border);
  border-radius: 10px;
  background: var(--elm-surface);
  margin: 1rem 0;
}
.elm-table { width: 100%; border-collapse: collapse; font-size: 0.89rem; }
.elm-table th, .elm-table td {
  padding: 0.65rem 0.78rem;
  text-align: left;
  border-bottom: 1px solid var(--elm-border);
  vertical-align: top;
}
.elm-table th { background: var(--elm-surface-alt); font-weight: 700; color: var(--elm-ink); }
.elm-table tr:last-child td { border-bottom: none; }

/* Code Snippets */
.elm-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}
.elm-config-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  border: 1px solid #1e293b;
  overflow: hidden;
}
.elm-config-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.62rem 0.9rem;
  background: #1e293b;
  font-size: 0.84rem;
}
.elm-config-actions { display: inline-flex; gap: 0.45rem; }
.elm-copy-btn {
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 6px;
  padding: 0.25rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.elm-copy-btn:hover { background: var(--elm-accent); border-color: var(--elm-accent); }
.elm-config-box pre {
  margin: 0;
  padding: 0.9rem;
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.48;
  color: #e2e8f0;
}

/* Cards & Grids */
.elm-card-grid, .elm-tco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.4rem;
}
.elm-card, .elm-tco-card {
  background: var(--elm-surface);
  border: 1px solid var(--elm-border);
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
}
.elm-card h3, .elm-tco-card h3 { margin: 0; font-size: 1.05rem; }
.elm-tco-price { font-family: var(--elm-mono); font-size: 1.32rem; font-weight: 800; color: var(--elm-accent); margin: 0.25rem 0; }
.elm-tco-meta { font-size: 0.85rem; color: var(--elm-muted); margin: 0.15rem 0; }

.elm-diagram {
  background: var(--elm-surface);
  border: 1px solid var(--elm-border);
  border-radius: 12px;
  padding: 1rem;
  margin: 1.35rem 0;
}
.elm-diagram figcaption { font-size: 0.85rem; color: var(--elm-muted); margin-top: 0.55rem; }

.elm-note-box {
  background: var(--elm-surface-alt);
  border-left: 4px solid var(--elm-accent);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.15rem;
  margin: 1.1rem 0;
}
.elm-note-box h2, .elm-note-box h3 { margin-top: 0; }

/* Footer */
.elm-footer {
  background: var(--elm-surface);
  border-top: 1px solid var(--elm-border);
  padding: 2rem 0 5.2rem;
  font-size: 0.88rem;
  color: var(--elm-muted);
}
.elm-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.35rem;
}
.elm-footer-links { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.elm-footer-links li { margin-bottom: 0.35rem; }

/* Sticky Action Bar */
.mob-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--elm-surface);
  border-top: 1px solid var(--elm-border);
  padding: 0.62rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  z-index: 50;
}
.mob-sticky-text { font-size: 0.86rem; font-weight: 700; color: var(--elm-ink); }
.mob-sticky-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.mob-sticky-cta {
  background: var(--elm-accent);
  color: #ffffff;
  text-decoration: none;
  padding: 0.44rem 0.88rem;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}
.mob-sticky-cta:hover { background: var(--elm-accent-dark); color: #ffffff; }
.mob-sticky-alt {
  padding: 0.42rem 0.78rem;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.81rem;
  text-decoration: none;
  border: 1px solid var(--elm-accent);
  color: var(--elm-accent);
  white-space: nowrap;
}
.mob-sticky-alt:hover { background: var(--elm-accent-soft); }

.elm-w-1{width:1%;}.elm-w-2{width:2%;}.elm-w-3{width:3%;}.elm-w-4{width:4%;}.elm-w-5{width:5%;}.elm-w-6{width:6%;}.elm-w-7{width:7%;}.elm-w-8{width:8%;}.elm-w-9{width:9%;}.elm-w-10{width:10%;}.elm-w-11{width:11%;}.elm-w-12{width:12%;}.elm-w-13{width:13%;}.elm-w-14{width:14%;}.elm-w-15{width:15%;}.elm-w-16{width:16%;}.elm-w-17{width:17%;}.elm-w-18{width:18%;}.elm-w-19{width:19%;}.elm-w-20{width:20%;}.elm-w-21{width:21%;}.elm-w-22{width:22%;}.elm-w-23{width:23%;}.elm-w-24{width:24%;}.elm-w-25{width:25%;}.elm-w-26{width:26%;}.elm-w-27{width:27%;}.elm-w-28{width:28%;}.elm-w-29{width:29%;}.elm-w-30{width:30%;}.elm-w-31{width:31%;}.elm-w-32{width:32%;}.elm-w-33{width:33%;}.elm-w-34{width:34%;}.elm-w-35{width:35%;}.elm-w-36{width:36%;}.elm-w-37{width:37%;}.elm-w-38{width:38%;}.elm-w-39{width:39%;}.elm-w-40{width:40%;}.elm-w-41{width:41%;}.elm-w-42{width:42%;}.elm-w-43{width:43%;}.elm-w-44{width:44%;}.elm-w-45{width:45%;}.elm-w-46{width:46%;}.elm-w-47{width:47%;}.elm-w-48{width:48%;}.elm-w-49{width:49%;}.elm-w-50{width:50%;}.elm-w-51{width:51%;}.elm-w-52{width:52%;}.elm-w-53{width:53%;}.elm-w-54{width:54%;}.elm-w-55{width:55%;}.elm-w-56{width:56%;}.elm-w-57{width:57%;}.elm-w-58{width:58%;}.elm-w-59{width:59%;}.elm-w-60{width:60%;}.elm-w-61{width:61%;}.elm-w-62{width:62%;}.elm-w-63{width:63%;}.elm-w-64{width:64%;}.elm-w-65{width:65%;}.elm-w-66{width:66%;}.elm-w-67{width:67%;}.elm-w-68{width:68%;}.elm-w-69{width:69%;}.elm-w-70{width:70%;}.elm-w-71{width:71%;}.elm-w-72{width:72%;}.elm-w-73{width:73%;}.elm-w-74{width:74%;}.elm-w-75{width:75%;}.elm-w-76{width:76%;}.elm-w-77{width:77%;}.elm-w-78{width:78%;}.elm-w-79{width:79%;}.elm-w-80{width:80%;}.elm-w-81{width:81%;}.elm-w-82{width:82%;}.elm-w-83{width:83%;}.elm-w-84{width:84%;}.elm-w-85{width:85%;}.elm-w-86{width:86%;}.elm-w-87{width:87%;}.elm-w-88{width:88%;}.elm-w-89{width:89%;}.elm-w-90{width:90%;}.elm-w-91{width:91%;}.elm-w-92{width:92%;}.elm-w-93{width:93%;}.elm-w-94{width:94%;}.elm-w-95{width:95%;}.elm-w-96{width:96%;}.elm-w-97{width:97%;}.elm-w-98{width:98%;}.elm-w-99{width:99%;}.elm-w-100{width:100%;}
