:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #0f0f0f;
  --muted: #606060;
  --line: #e5e5e5;
  --hover: #f2f2f2;
  --chip: #f2f2f2;
  --blue: #065fd4;
  --blue-text: #ffffff;
  --blue-soft: #def1ff;
  --red: #ff0033;
  --green: #0f9d58;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --surface: #212121;
    --text: #f1f1f1;
    --muted: #aaaaaa;
    --line: #3e3e3e;
    --hover: #2e2e2e;
    --chip: #303030;
    --blue: #3ea6ff;
    --blue-text: #0f0f0f;
    --blue-soft: #263850;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.4 Roboto, Arial, sans-serif;
}
svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
button, input { font: inherit; color: inherit; }
h1 { margin: 0 0 20px; font-size: 25px; font-weight: 500; }
code, kbd {
  padding: 1px 6px; background: var(--chip); border-radius: 4px;
  font: 13px ui-monospace, SFMono-Regular, Menlo, monospace;
}
kbd { border: 1px solid var(--line); }

/* ---------- buttons ---------- */
.primary, .outline, .text-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 18px;
  font-weight: 500; text-decoration: none; cursor: pointer;
}
.primary { background: var(--blue); color: var(--blue-text); border: 0; }
.primary:hover { filter: brightness(1.1); }
.primary.big { height: 48px; padding: 0 40px; border-radius: 24px; font-size: 16px; }
.outline { color: var(--blue); border: 1px solid var(--line); background: none; }
.outline:hover { background: var(--blue-soft); }
.text-btn { color: var(--text); background: none; border: 0; }
.text-btn:hover { background: var(--hover); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center;
  height: 64px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: inherit; text-decoration: none; font-size: 20px; letter-spacing: -0.3px;
}
.brand b { font-weight: 500; }
.logo {
  display: grid; place-items: center;
  width: 32px; height: 22px; border-radius: 6px;
  background: var(--red); color: #fff;
}
.logo svg { width: 20px; height: 20px; }

/* ---------- intro ---------- */
.intro { max-width: 1040px; margin: 0 auto; padding: 72px 24px 80px; text-align: center; }
.intro h1 { margin: 0 0 12px; font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -1px; }
.subtitle { max-width: 560px; margin: 0 auto 48px; font-size: 18px; color: var(--muted); }

.compare { display: flex; align-items: center; gap: 20px; margin-bottom: 48px; }
.compare figure { flex: 1; margin: 0; }
.compare .arrow { width: 32px; height: 32px; color: var(--muted); }
.frame { position: relative; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 1px 2px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.08); }
.frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ad-chip {
  position: absolute; left: 12px; bottom: 12px;
  padding: 2px 8px; border-radius: 4px;
  background: #fc0; color: #0f0f0f; font-size: 12px; font-weight: 500;
}
.ad-chip.ours { background: var(--blue); color: #fff; }
.compare figcaption { margin-top: 12px; font-size: 15px; font-weight: 500; color: var(--muted); }

/* ---------- flow pages (create, install) ---------- */
.flowpage { max-width: 680px; margin: 0 auto; padding: 32px 24px 80px; }

.stepper { display: flex; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 3px solid var(--line); color: var(--muted); font-weight: 500; }
.stepper span {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--chip); font-size: 12px;
}
.stepper .current, .stepper .done { color: var(--text); border-color: var(--blue); }
.stepper .current span, .stepper .done span { background: var(--blue); color: var(--blue-text); }

.form { padding: 24px; display: flex; flex-direction: column; gap: 24px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend, .field > span { display: block; margin-bottom: 10px; font-size: 15px; font-weight: 500; }
.field em { margin-left: 4px; font-style: normal; font-weight: 400; color: var(--muted); }
.field input[type="text"] {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: none;
}
.field input[type="text"]:focus { border: 2px solid var(--blue); padding: 0 11px; }
.field input[type="file"] { color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 8px 14px; border-radius: 8px;
  background: var(--chip); font-weight: 500; cursor: pointer;
}
.chips span:hover { filter: brightness(0.96); }
.chips input:checked + span { background: var(--text); color: var(--surface); }
.chips input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.install { display: flex; flex-direction: column; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.install li { display: flex; gap: 16px; margin: 0; padding: 20px; }
.install .num {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); font-weight: 700;
}
.install h2 { margin: 4px 0 4px; font-size: 16px; font-weight: 500; }
.install p { margin: 0 0 12px; color: var(--muted); }
.install .outline { margin-top: 8px; }

.urlbar {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 18px;
  background: var(--chip); font-size: 14px;
}
.urlbar svg { width: 16px; height: 16px; color: var(--muted); }
.mock-toggle { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; }
.switch { position: relative; width: 36px; height: 14px; border-radius: 7px; background: #8ab4f8; }
.switch::after { content: ""; position: absolute; right: -2px; top: -3px; width: 20px; height: 20px; border-radius: 50%; background: #1a73e8; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mock-btn {
  display: inline-block; padding: 7px 16px; border-radius: 4px;
  border: 1px solid var(--line); color: #1a73e8; font-weight: 500;
}

/* ---------- dashboard ---------- */
.layout { display: flex; }
.sidebar {
  flex: none; width: 240px; min-height: calc(100vh - 64px); padding: 12px 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar a {
  position: relative;
  display: flex; align-items: center; gap: 24px;
  height: 48px; padding: 0 24px;
  color: var(--muted); text-decoration: none; font-size: 15px;
}
.sidebar a:hover { background: var(--hover); }
.sidebar a.active { color: var(--red); background: var(--hover); font-weight: 500; }
.sidebar a.active::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 48px; background: var(--red); }

.layout main { flex: 1; min-width: 0; max-width: 1100px; padding: 24px 32px 48px; }

.flow { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; flex-wrap: wrap; }
.flow li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 500;
}
.flow span {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); color: var(--surface); font-size: 12px;
}

.card { margin-bottom: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.install .card, .form.card { margin-bottom: 0; }
.tabs { display: flex; padding: 0 16px; border-bottom: 1px solid var(--line); }
.tab { padding: 14px 8px; color: var(--muted); font-weight: 500; }
.tab.active { color: var(--text); box-shadow: inset 0 -3px 0 var(--text); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--hover); }
td.video { display: flex; align-items: center; gap: 16px; }
td.video video { width: 160px; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; }
.title { font-weight: 500; }
.sub { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; }
.empty > svg { width: 56px; height: 56px; color: var(--muted); }
.empty p { margin: 0; font-size: 16px; }

@media (max-width: 800px) {
  .sidebar { display: none; }
  .layout main { padding: 16px; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  td.video video { width: 112px; }
  .intro { padding: 40px 16px 56px; }
  .intro h1 { font-size: 32px; }
  .compare { flex-direction: column; }
  .compare .arrow { transform: rotate(90deg); }
  .flowpage { padding: 24px 16px 56px; }
}

.back-link { margin-left: auto; color: inherit; opacity: .7; font-size: 14px; text-decoration: none; }
.back-link:hover { opacity: 1; }

/* ---------- create: make it on fal ---------- */
.how { padding: 24px; }
.how-steps { margin: 0; padding-left: 20px; display: grid; gap: 18px; }
.how-steps li { color: var(--muted); }
.how-steps b { color: var(--text); font-weight: 500; }
.how-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.how-prompt { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--chip); color: var(--text); font-size: 13px; }
.flowpage > .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
