:root {
  --bg: #edf2f9;
  --bg-deep: #d7e3f1;
  --ink: #081a33;
  --muted: #3f5164;
  --accent: #004b93;
  --accent-deep: #003a73;
  --accent-soft: #0b6fb8;
  --panel: #f8fbff;
  --panel-alt: #eef4fb;
  --border: rgba(0, 75, 147, 0.18);
  --border-strong: rgba(0, 75, 147, 0.3);
  --shadow: 0 20px 44px rgba(8, 26, 51, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, #ffffff 0%, var(--bg) 45%, var(--bg-deep) 100%),
    linear-gradient(135deg, rgba(0, 75, 147, 0.08), rgba(11, 111, 184, 0.06));
  color: var(--ink);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(transparent 94%, rgba(0, 75, 147, 0.14) 95%),
    linear-gradient(90deg, transparent 94%, rgba(0, 75, 147, 0.14) 95%);
  background-size: 48px 48px;
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}

.hero {
  padding: 28px 20px 16px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7fd 100%);
  border-radius: 24px;
  padding: 22px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}


h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  margin: 14px 0 6px;
  color: var(--accent);
}

.hero-subtitle {
  max-width: 680px;
  color: var(--muted);
  margin: 0 0 12px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

.btn-ghost {
  border: 1px solid var(--border-strong);
  background: #f3f8ff;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}


.layout {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 10px;
}

.panel-actions { display: flex; align-items: center; gap: 12px; }

.btn-mini {
  border: 1px solid var(--border-strong);
  background: #f3f8ff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink);
}

.tty-panel {
  grid-column: 1 / -1;
}

#tasks-panel {
  grid-column: 1 / -1;
}

.cheat-panel {
  grid-column: 1 / -1;
}

.tty-frame-wrap {
  height: 520px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  background: #071a32;
  overflow: hidden;
  position: relative;
}

.tty-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f1f1f1;
  gap: 12px;
}

.tty-frame {
  width: 100%;
  height: 100%;
  border: none;
}

.tasks {
  display: grid;
  gap: 16px;
}

.task {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: var(--panel-alt);
}

.task h3 { margin: 0 0 6px; }

.task p { margin: 0 0 10px; color: var(--muted); }


.solution {
  margin-top: 10px;
  border-top: 1px dashed var(--border-strong);
  padding-top: 10px;
  display: none;
}

.solution pre {
  font-family: "IBM Plex Mono", monospace;
  background: #081a33;
  color: #e6eef7;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
}

.solution.show { display: block; }

.solution-toggle {
  background: var(--accent-soft);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.cheat-panel {
  display: none;
}

.cheat-panel.show {
  display: block;
}

.cheatsheet {
  display: grid;
  gap: 12px;
}

.cheat-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
  background: #081a33;
  color: #e6eef7;
  padding: 12px;
  border-radius: 10px;
}

.filter label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 6px;
}

.footer {
  text-align: center;
  padding: 40px 20px 60px;
  color: var(--muted);
}

.footer-note { font-size: 0.8rem; margin-top: 6px; }

@media (max-width: 900px) {
  .tty-panel { grid-column: span 1; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .cheat-row { grid-template-columns: 1fr; }
}
