:root {
  --ink: #162019;
  --muted: #5c6b62;
  --line: #d9e0dc;
  --paper: #f7f9f4;
  --surface: #ffffff;
  --green: #1f6f50;
  --green-dark: #134631;
  --cyan: #1f8d96;
  --coral: #d76242;
  --yellow: #f2c14e;
  --shadow: 0 20px 70px rgba(24, 35, 29, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 56px);
  background: rgba(247, 249, 244, 0.86);
  border-bottom: 1px solid rgba(217, 224, 220, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
  background: rgba(22, 32, 25, 0.06);
}

.nav-button {
  color: #fff;
  background: var(--ink);
}

nav .nav-button:hover {
  color: #fff;
  background: var(--green-dark);
}

.container {
  width: min(1120px, calc(100vw - 40px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 86vh;
  overflow: hidden;
  padding: 168px 0 92px;
  isolation: isolate;
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(31, 141, 150, 0.22), transparent 34%),
    linear-gradient(125deg, #f7f9f4 0%, #eef4ef 44%, #dcebe7 100%);
  z-index: -2;
}

.grid-field {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(22, 32, 25, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 32, 25, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(760px) rotateX(58deg) translateY(12%);
  transform-origin: 50% 100%;
}

.workspace-shell {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 54px;
  width: min(560px, 48vw);
  height: 440px;
}

.window {
  position: absolute;
  border: 1px solid rgba(22, 32, 25, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.window-bar {
  height: 36px;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid rgba(22, 32, 25, 0.08);
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-bar span:nth-child(1) { background: var(--coral); }
.window-bar span:nth-child(2) { background: var(--yellow); }
.window-bar span:nth-child(3) { background: var(--green); }

.terminal-window {
  left: 42px;
  top: 44px;
  width: 420px;
  min-height: 234px;
  background: rgba(17, 27, 22, 0.92);
  color: #e9f6ed;
}

.terminal-lines {
  padding: 16px 18px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
}

.terminal-lines p {
  margin: 0;
}

.terminal-lines p::before {
  content: "$ ";
  color: #80d0a8;
}

.metrics-window {
  right: 0;
  top: 124px;
  width: 210px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(22, 32, 25, 0.09);
  font-size: 13px;
}

.metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric span {
  color: var(--muted);
}

.stack-window {
  left: 0;
  bottom: 24px;
  width: 300px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.stack-window span {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(31, 111, 80, 0.1);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.hero-content {
  max-width: 650px;
  margin-left: max(20px, calc((100vw - 1120px) / 2));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 11vw, 138px);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.lede {
  max-width: 620px;
  margin: 24px 0 0;
  color: #2e3f34;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(22, 32, 25, 0.16);
}

.button.secondary:hover {
  border-color: rgba(22, 32, 25, 0.34);
}

.button.full {
  width: 100%;
}

.section {
  padding: 80px 0;
}

.compact-section {
  padding-top: 42px;
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature,
.program,
.status-panel,
.auth-card,
.stat,
.table-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature {
  padding: 26px;
}

.feature-index {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  border-radius: 50%;
  background: #e2f0e9;
  color: var(--green-dark);
  font-weight: 900;
}

.feature h2 {
  font-size: 26px;
}

.feature p,
.program p,
.auth-card p,
.status-panel dd,
.empty {
  color: var(--muted);
  line-height: 1.55;
}

.split-section {
  background: #111b16;
  color: #eef8f1;
}

.split {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 56px;
  align-items: start;
}

.split .eyebrow {
  color: #80d0a8;
}

.program-list {
  display: grid;
  gap: 14px;
}

.program {
  padding: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.program p {
  color: #c7d7cd;
}

.auth-main,
.app-main {
  min-height: 100vh;
  padding: 112px 20px 56px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 430px;
  min-height: 580px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 111, 80, 0.85), rgba(31, 141, 150, 0.88)),
    #1f6f50;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 32px 32px;
}

.mini-console {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 52px;
  min-height: 156px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(17, 27, 22, 0.9);
  color: #e9f6ed;
  font-family: "SFMono-Regular", Consolas, monospace;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.mini-console span {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 50%;
  background: #80d0a8;
}

.mini-console p {
  margin: 42px 0 0;
}

.auth-card {
  border: 0;
  border-radius: 0;
  padding: 54px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card h1 {
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.98;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

label {
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(31, 141, 150, 0.22);
  border-color: var(--cyan);
}

.form-error {
  margin: 0;
  color: #a33d28;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.dashboard-hero {
  min-height: 420px;
  padding: 52px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    radial-gradient(circle at 86% 18%, rgba(215, 98, 66, 0.18), transparent 30%),
    radial-gradient(circle at 28% 78%, rgba(31, 141, 150, 0.18), transparent 32%);
  border: 1px solid var(--line);
}

.dashboard-hero h1,
.admin-heading h1 {
  max-width: 760px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
}

.status-panel {
  padding: 24px;
}

.status-panel h2,
.table-section h2 {
  margin: 0 0 18px;
  font-size: 18px;
}

dl {
  display: grid;
  gap: 16px;
  margin: 0 0 24px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.admin-layout {
  display: grid;
  gap: 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.table-section {
  padding: 22px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .site-header {
    height: 64px;
  }

  nav a {
    padding: 0 10px;
  }

  .hero {
    min-height: auto;
    padding: 128px 0 54px;
  }

  .workspace-shell {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100% - 40px, 520px);
    height: auto;
    margin: 42px auto 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .workspace-shell .window {
    position: static;
    width: 100%;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  .terminal-window {
    min-height: 0;
  }

  .hero-content {
    margin: 0 auto;
  }

  .three-up,
  .split,
  .dashboard-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 260px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .site-header {
    padding: 0 14px;
  }

  nav a:not(.nav-button) {
    display: none;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .auth-main,
  .app-main {
    padding: 92px 14px 36px;
  }

  .auth-card,
  .dashboard-hero {
    padding: 30px 22px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
