:root{
  --bg:#0f141c;
  --panel:#151c26;
  --border:#33474d;
  --text:#e6edf6;
  --muted:#9aa7ba;
  --accent:#4ea1ff;
  --radius:14px;
  --max:1100px;
  --focus: rgba(78,161,255,0.22);
  --font:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box;}

html, body{height:100%;}

body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}

.wrap{
  width:min(var(--max), calc(100% - 40px));
  margin:0 auto;
}

a{color:inherit;}

header{
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom:1px solid var(--border);
  background: rgba(15,20,28,0.85);
  backdrop-filter: blur(10px);
}

.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 0;
  gap:16px;
}

.brand-home{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}

.brand-row{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 180px;
}

.brand{
  font-weight:600;
  letter-spacing:0.06em;
  font-size:13px;
  color:var(--text);
  text-transform: uppercase;
}

nav{
  display:flex;
  gap:18px;
  font-size:14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a{
  color:var(--muted);
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid transparent;
}

nav a:hover{
  color:var(--text);
  border-color: rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
}

nav a:focus{
  outline: none;
  box-shadow: 0 0 0 4px var(--focus);
}

nav a.active{
  color:var(--text);
  border-color:rgba(255,255,255,0.15);
  background:rgba(255,255,255,0.05);
}

nav a.active:hover{
  background:rgba(255,255,255,0.08);
}

.hero{
  padding:26px 0 26px;
}

.hero h1{
  font-size:42px;
  margin:0 0 14px;
  letter-spacing:-0.02em;
  line-height:1.15;
}

.hero p{
  color:var(--muted);
  max-width:640px;
  font-size:16px;
  margin:0 0 22px;
}

.pill{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:8px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,0.03);
  color:var(--muted);
  font-size:13px;
  margin-bottom: 18px;
}

.pill .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(78,161,255,0.7);
}

.button{
  display:inline-block;
  padding:12px 18px;
  border-radius:10px;
  border:1px solid var(--accent);
  color:var(--text);
  background:rgba(78,161,255,0.10);
  text-decoration:none;
  font-size:14px;
  transition:background .2s ease;
}

.button:hover{
  background:rgba(78,161,255,0.18);
}

.button.secondary{
  border-color: var(--border);
  background: transparent;
}

.button.secondary:hover{
  background: rgba(255,255,255,0.04);
}

.section{
  padding:58px 0;
  border-top:1px solid var(--border);
}

.section h2{
  font-size:20px;
  margin:0 0 12px;
  letter-spacing:-0.01em;
}

.section p{
  color:var(--muted);
  max-width:720px;
  font-size:15px;
  margin:0 0 22px;
}

.grid{
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  gap:18px;
}

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
}

.card h3{
  margin:0 0 8px;
  font-size:16px;
}

.card p{
  margin:0;
  font-size:14px;
  color:var(--muted);
}

.app-list{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
}

.app-row{
  padding:16px 20px;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}

.app-row:last-child{
  border-bottom:none;
}

.app-row .title{
  font-weight:700;
  font-size:15px;
  margin:0 0 4px;
}

.app-row .desc{
  margin:0;
  color:var(--muted);
  font-size:14px;
  max-width: 70ch;
}

footer{
  border-top:1px solid var(--border);
}

.footer{
  padding:26px 0 34px;
  font-size:13px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.footer strong{
  color: var(--text);
  font-weight:600;
}

.footer-left{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.footer-link{
  color:var(--muted);
  text-decoration:none;
  padding:4px 8px;
  border-radius:8px;
  transition:all .2s ease;
}

.footer-link:hover{
  color:var(--accent);
  background:rgba(78,161,255,0.08);
}

.footer-sep{
  opacity:0.4;
}

@media (max-width:768px){
  .hero h1{font-size:30px;}
  .app-row{flex-direction:column;align-items:flex-start;}
  .footer{flex-direction:column;align-items:flex-start;}
}

.hero-tight{ padding:54px 0 34px; }
.section-tight{ padding:34px 0 58px; }

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.apps-toolbar{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.input{
  width:100%;
  max-width:720px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,0.03);
  color:var(--text);
  font-size:14px;
}

.input::placeholder{ color:rgba(154,167,186,0.75); }

.input:focus{
  outline:none;
  box-shadow: 0 0 0 4px var(--focus);
  border-color: rgba(78,161,255,0.45);
}

.chips{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chip{
  border:1px solid var(--border);
  background:rgba(255,255,255,0.02);
  color:var(--muted);
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  cursor:pointer;
}

.chip:hover{
  color:var(--text);
  background:rgba(255,255,255,0.04);
}

.chip.is-active{
  color:var(--text);
  border-color: rgba(78,161,255,0.45);
  background: rgba(78,161,255,0.10);
}

.apps-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:18px;
}

.app-card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.app-card-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.app-title{
  font-weight:700;
  font-size:16px;
  margin:0;
}

.app-meta{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:8px;
}

.meta{
  color:var(--muted);
  font-size:13px;
}

.badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 10px;
  border:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
  background:rgba(255,255,255,0.02);
}

.badge-live{
  border-color: rgba(78,161,255,0.45);
  background: rgba(78,161,255,0.10);
  color: var(--text);
}

.badge-beta{
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.badge-dev{
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.02);
}

.app-desc{
  margin:0;
  color:var(--muted);
  font-size:14px;
  max-width: 70ch;
}

.app-actions{
  margin-top:auto;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

@media (max-width:768px){
  .hero-tight{ padding:44px 0 28px; }
}

/* =========================
   Test Lab variant
   ========================= */
body.test-lab{
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(180deg, #0e1c2f 0%, #0b1220 60%, #09101a 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-attachment: fixed;
}

body.test-lab a,
body.test-lab a:hover,
body.test-lab a:focus{
  text-decoration: none;
}