:root {
  color-scheme: dark;
  --bg: #050505;
  --text: #f3f0e8;
  --muted: #9a968c;
  --line: #2a2926;
  --soft: #12110f;
  --soft-2: #1a1815;
  --accent: #f3f0e8;
  --ok: #a7d7b8;
  --warn: #d8b486;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", Courier, "SFMono-Regular", Consolas, monospace;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 72px;
}

.topbar {
  display: grid;
  gap: 20px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 400;
}

.status {
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--warn);
  font-size: 13px;
}

.status.ready {
  color: var(--ok);
}

.tool-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.tool-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 104px;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.tool-card:hover strong {
  color: #ffffff;
}

.tool-card strong,
.tool-card small {
  display: block;
}

.tool-card strong {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 400;
}

.tool-card small {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.tool-card.muted {
  cursor: not-allowed;
  opacity: 0.42;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
}

.tool-card:hover .tool-icon {
  border-color: #5a5750;
  background: var(--soft-2);
}

.workspace {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.workspace.locked {
  opacity: 0.72;
}

.workspace h2 {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 400;
}

.workspace p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.primary {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--text);
  font-weight: 400;
  cursor: pointer;
}

.primary:hover {
  border-color: #5a5750;
  background: var(--soft-2);
}

.primary:disabled {
  cursor: not-allowed;
  color: #5c5850;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
}

.hidden {
  display: none;
}

.modal {
  position: relative;
  width: min(760px, 100%);
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.close-button:hover {
  border-color: #5a5750;
  background: var(--soft-2);
}

.carousel {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  min-height: 390px;
}

.gif-panel {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(243, 240, 232, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 240, 232, 0.06) 1px, transparent 1px),
    #0a0a09;
  background-size: 28px 28px, 28px 28px, auto;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  box-shadow: 0 0 18px rgba(243, 240, 232, 0.72);
  animation: scan 2.8s infinite ease-in-out;
}

.bbox {
  position: absolute;
  border: 1px solid var(--text);
  animation: pulse 1.8s infinite ease-in-out;
}

.bbox.one {
  width: 35%;
  height: 24%;
  left: 16%;
  top: 22%;
}

.bbox.two {
  width: 24%;
  height: 18%;
  right: 14%;
  top: 48%;
  border-color: var(--muted);
  animation-delay: 0.4s;
}

.bbox.three {
  width: 18%;
  height: 14%;
  left: 38%;
  bottom: 14%;
  border-color: var(--warn);
  animation-delay: 0.8s;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px 38px;
}

.intro-copy h2 {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
}

.intro-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
}

.dots {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.intro-start {
  align-self: flex-start;
  margin-top: 26px;
}

.dot {
  width: 8px;
  height: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.dot.active {
  background: var(--text);
}

.login-modal {
  display: grid;
  gap: 16px;
  max-width: 420px;
  padding: 30px;
}

.login-modal h2 {
  margin-bottom: 4px;
  font-size: 28px;
  font-weight: 400;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 400;
}

input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  color: var(--text);
}

input:focus {
  outline: 1px solid #5a5750;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@keyframes scan {
  0% { top: 8%; }
  50% { top: 88%; }
  100% { top: 8%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.02); opacity: 1; }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 30px, 760px);
    padding-top: 56px;
  }

  h1 {
    font-size: 38px;
  }

  .tool-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tool-icon,
  .primary {
    width: 100%;
  }

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

  .gif-panel {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-copy {
    padding: 28px;
  }
}
