:root {
  --page: #151a25;
  --panel: #1f2735;
  --card: #232c3c;
  --card-hover: #293346;
  --card-border: rgba(255, 255, 255, .10);
  --card-border-2: rgba(255, 255, 255, .17);
  --title: #f4f7fc;          /* highest contrast — titles */
  --text: #e6ebf4;
  --muted: #aeb8ca;          /* secondary — descriptions */
  --faint: #8995ab;          /* tertiary — hosts (still readable) */
  --icon: #b9c5dd;           /* icons, visually distinct from body text */
  --accent: #6f86d6;         /* one restrained brand accent, used sparingly */
  --btn: #2c3850;
  --btn-hover: #364663;
  --btn-border: rgba(255, 255, 255, .17);
  --done: #54c891;           /* muted status green */
  --next: #e6b549;           /* muted status amber */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .30);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  color: var(--text);
  background-color: var(--page);
  background-image: radial-gradient(rgba(255, 255, 255, .032) 1px, transparent 1.4px);
  background-size: 26px 26px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(18px, 4vw, 40px) 48px;
}

/* ---------- Hero (studio control header) ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 30px) clamp(24px, 3.4vw, 34px);
  box-shadow: var(--shadow-sm);
}
.hero::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #b65a86, #4f8fa6, #c0a049); opacity: .45;
}
.hero-inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 16px; }
.logo {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 13px;
  background: linear-gradient(160deg, #313c52, #242d3d);
  border: 1px solid var(--card-border-2);
  color: #d3ddef; font-weight: 700; font-size: 15px; letter-spacing: 1px; flex: none;
}
.brand-text h1 { margin: 0; font-size: clamp(21px, 2.8vw, 27px); font-weight: 700; letter-spacing: -.01em; color: var(--title); }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .04em; font-family: var(--mono); }
.project { text-align: right; }
.chip {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--card-border);
  padding: 4px 11px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em;
}
.project-name { display: block; margin-top: 7px; font-weight: 700; font-size: 18px; color: var(--title); }

/* ---------- Section headers ---------- */
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 14.5px; font-weight: 700; color: var(--title); margin: 0 0 14px;
}
.section-title::before {
  content: ""; width: 12px; height: 12px; border-radius: 3px;
  background: var(--accent); opacity: .85; flex: none;
}

/* ---------- Main: flow (left) + apps (right), roomier on desktop ---------- */
.main { margin-top: 22px; display: grid; gap: 18px; }
@media (min-width: 980px) {
  .main { grid-template-columns: minmax(340px, 1fr) minmax(0, 2.05fr); gap: 22px; align-items: stretch; }
}

/* ---------- Left: operations panel ---------- */
.flow {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--card-border); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow-sm);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.panel-head .section-title { margin: 0; }
.panel-sub { font-size: 12px; font-weight: 500; color: var(--faint); font-family: var(--mono); }
.flow-sub { margin: 20px 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--faint); }
.panel-head + .flow-sub { margin-top: 18px; }

.phases { display: grid; gap: 11px; }
.phase {
  display: flex; flex-direction: column; gap: 8px; padding: 14px 15px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--card-border);
  border-left: 4px solid var(--card-border-2); border-radius: 11px;
}
.phase--done { border-left-color: var(--done); }
.phase--next {
  border-left-color: var(--next);
  background: rgba(230, 181, 73, .07);
  border-color: rgba(230, 181, 73, .28);
}
.phase-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phase-label {
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .03em;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--card-border);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap; color: var(--text);
}
.phase-title { font-weight: 650; font-size: 15px; color: var(--title); }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.pill--done { background: color-mix(in srgb, var(--done) 16%, transparent); color: var(--done); }
.pill--done::before { background: var(--done); }
.pill--next { background: color-mix(in srgb, var(--next) 18%, transparent); color: var(--next); }
.pill--next::before { background: var(--next); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.steps li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.steps .step-text { line-height: 1.3; }
.steps strong { font-weight: 700; color: var(--title); }
.steps .n {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: rgba(111, 134, 214, .16); border: 1px solid rgba(111, 134, 214, .34);
  color: #aebcf0; font-family: var(--mono); font-size: 13px; font-weight: 700; flex: none;
}

/* ---------- Right: app launcher (uniform 3 x 2, roomier) ---------- */
.apps { min-width: 0; display: flex; flex-direction: column; }
.grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px; flex: 1;
}
.card {
  display: flex; flex-direction: column; gap: 9px; padding: 18px;
  min-height: 168px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 13px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-2);
  background: var(--card-hover);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card-head { display: flex; align-items: center; gap: 12px; }
.ic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--card-border-2);
  color: var(--icon); flex: none;
}
.ic svg { width: 22px; height: 22px; }
.card .t { font-weight: 700; font-size: 16px; color: var(--title); letter-spacing: -.01em; }
.card .d { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.card .host { color: var(--faint); font-size: 12px; letter-spacing: .02em; font-family: var(--mono); }

.cta {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px;
  background: var(--btn); border: 1px solid var(--btn-border);
  color: #eaf0fa; font-weight: 650; font-size: 13px; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.cta svg { width: 15px; height: 15px; flex: none; transition: transform .14s ease; }
.card:hover .cta { background: var(--btn-hover); border-color: rgba(150, 172, 228, .5); color: #fff; }
.card:hover .cta svg { transform: translateX(2px); }

/* ---------- Footer ---------- */
.foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--card-border); text-align: center; }
.foot-brand { margin: 0; font-weight: 650; color: var(--text); }
.muted { color: var(--muted); }
.foot .muted { margin: 5px 0 0; font-size: 12.5px; }
.build-marker { margin: 10px 0 0; font-size: 11.5px; letter-spacing: .04em; color: var(--faint); font-family: var(--mono); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hero-inner { flex-direction: column; align-items: flex-start; } .project { text-align: left; } }
@media (max-width: 430px) { .grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { .card, .cta, .cta svg { transition: none; } }
