:root {
  color-scheme: light;
  --bg: #f7f8f3;
  --ink: #171717;
  --muted: #5b6067;
  --line: #cfd6ce;
  --field: #ffffff;
  --field-strong: #f1f6f2;
  --accent: #2da44e;
  --accent-dark: #1a7f37;
  --hot: #c43b4d;
  --shadow: rgba(23, 23, 23, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(45, 164, 78, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(196, 59, 77, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.workspace {
  width: min(920px, 100%);
  display: grid;
  gap: 28px;
}

.brand-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand-mark {
  width: clamp(64px, 12vw, 96px);
  height: auto;
  filter: drop-shadow(0 12px 18px var(--shadow));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--hot);
  font-weight: 800;
  text-transform: lowercase;
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: 4.6rem;
  line-height: 0.95;
}

.search-maker,
.result-panel,
.demo-stage {
  display: grid;
  gap: 12px;
}

.lesson-mode .search-maker,
.lesson-mode .result-panel,
.lesson-mode .seo-copy {
  display: none;
}

.lesson-mode .demo-stage[hidden] {
  display: grid;
}

label {
  color: var(--muted);
  font-weight: 800;
}

.share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

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

.options-grid label {
  display: grid;
  gap: 8px;
}

input,
select {
  width: 100%;
  min-height: 56px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--field);
  box-shadow: 0 10px 24px rgba(23, 23, 23, 0.07);
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    var(--field);
  background-position: calc(100% - 20px) 24px, calc(100% - 14px) 24px, 0 0;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px, 100%;
}

input:disabled {
  color: var(--muted);
  background: #eef2ee;
  box-shadow: none;
}

input:focus,
select:focus {
  outline: 4px solid rgba(45, 164, 78, 0.2);
  border-color: var(--accent);
}

button,
.preview-link,
.skip-link {
  min-height: 56px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(45, 164, 78, 0.22);
}

button:hover,
.preview-link:hover,
.skip-link:hover {
  background: var(--accent-dark);
}

.secondary {
  color: var(--ink);
  background: var(--field-strong);
  border: 2px solid var(--line);
  box-shadow: none;
}

.secondary:hover {
  background: #e4eee6;
}

.preview-link,
.skip-link {
  width: fit-content;
}

.status {
  min-height: 1.4em;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 800;
}

.helper {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.seo-copy {
  max-width: 780px;
}

.seo-copy h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.seo-copy p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.seo-copy p:last-child {
  margin-bottom: 0;
}

.github-window {
  width: 100%;
  border: 2px solid #25292e;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 20px 50px var(--shadow);
}

.window-bar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: #25292e;
}

.window-bar span {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f85149;
}

.window-bar span:nth-child(2) {
  background: #d29922;
}

.window-bar span:nth-child(3) {
  background: #3fb950;
}

.github-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: #f6f8fa;
  border-bottom: 1px solid var(--line);
}

.github-header img {
  width: 42px;
  height: 42px;
}

.fake-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 2px solid #8c959f;
  border-radius: 8px;
  padding: 0 14px;
  color: #25292e;
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fake-search::after {
  content: "";
  width: 2px;
  height: 1.4em;
  margin-left: 4px;
  background: var(--accent);
  animation: blink 0.7s steps(1) infinite;
}

.fake-results {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.fake-filter {
  min-height: 38px;
  padding: 10px 22px 0;
  color: var(--muted);
  background: #ffffff;
  font-weight: 800;
}

.fake-results div {
  min-height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #d0d7de 0 34%, transparent 34%),
    linear-gradient(90deg, #eaeef2 0 74%, transparent 74%);
  background-size: 100% 12px, 100% 10px;
  background-position: 0 4px, 0 26px;
  background-repeat: no-repeat;
}

.demo-step {
  min-height: 1.6em;
  margin: 0;
  color: var(--hot);
  font-size: 1.25rem;
  font-weight: 900;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .app {
    align-items: start;
  }

  .brand-row,
  .share-row,
  .options-grid,
  .github-header {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }

  button,
  .preview-link,
  .skip-link {
    width: 100%;
  }
}
