:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-strong: #eef4f8;
  --ink: #142029;
  --muted: #63717d;
  --line: #d9e2e8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #b45309;
  --bad: #b91c1c;
  --good: #047857;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.home {
  display: grid;
  gap: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--panel);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.button:hover,
button:hover {
  border-color: #9fb4bf;
}

.button.primary,
button.primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

button.danger {
  border-color: #fecaca;
  color: var(--bad);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.status-grid article,
.panel,
.toolbar,
.log,
.dropzone {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.status-grid span,
.muted {
  color: var(--muted);
}

.app {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  padding: 16px;
}

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

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.between {
  justify-content: space-between;
}

.code {
  display: block;
  padding: 16px;
  border: 1px dashed #9fb4bf;
  border-radius: 8px;
  background: var(--panel-strong);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

input[type="text"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.stage {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 12px;
  min-width: 0;
}

.toolbar {
  min-height: 58px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.screen {
  position: relative;
  overflow: hidden;
  border: 1px solid #b7c8d1;
  border-radius: 8px;
  background: #0b1117;
  min-height: 520px;
  display: grid;
  place-items: center;
  outline: none;
}

.screen:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.screen:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  display: block;
  background: #0b1117;
}

.screen:fullscreen video {
  max-height: 100vh;
}

.placeholder {
  color: #a8b6c1;
  text-align: center;
  padding: 24px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--warn);
}

.pill.good .dot {
  background: var(--good);
}

.pill.bad .dot {
  background: var(--bad);
}

.log {
  height: 120px;
  overflow: auto;
  padding: 10px;
  color: var(--muted);
  background: #fbfcfd;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.dropzone {
  padding: 14px;
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 860px) {
  .hero,
  .app {
    grid-template-columns: 1fr;
  }

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

  .stage {
    min-height: auto;
  }
}

.support-shell {
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
  gap: 14px;
}

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.brand-block h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.7rem);
}

.support-start {
  min-width: 180px;
  min-height: 56px;
  font-size: 1.05rem;
  font-weight: 800;
}

.support-code-block,
.approval-banner,
.support-status {
  grid-column: 1 / -1;
}

.support-code-block {
  display: grid;
  gap: 10px;
}

.approval-banner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fffbeb;
}

.approval-banner span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.support-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.support-preview {
  min-height: 300px;
  overflow: hidden;
  border: 1px solid #b7c8d1;
  border-radius: 8px;
  background: #0b1117;
  display: grid;
  place-items: center;
}

.support-log {
  height: 100px;
}

@media (max-width: 760px) {
  .support-panel {
    grid-template-columns: 1fr;
  }

  .support-start {
    width: 100%;
  }

  .approval-banner {
    align-items: stretch;
    flex-direction: column;
  }
}
