/* The editor is the homepage; this is what sits under it. */
.app { height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 560px; }
.waiting .main { visibility: hidden; }

.brand-line { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-line h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 13px; line-height: 20px; font-weight: 500; }

.home { max-width: 1120px; margin: 0 auto; padding: 12px 24px 72px; font-size: 16px; line-height: 26px; }
.home > section + section { margin-top: 72px; }
.home h2 { font-size: 26px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.home-questions h2 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-muted); }
.home h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.home p { color: var(--text-muted); max-width: 68ch; }
.home .lead { margin-top: 4px; }
.home ul, .home ol { list-style: none; }
.home p a { color: var(--accent); text-underline-offset: 3px; }
.home code { font: 500 13px/20px var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }

.question-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 19px 16px; margin-top: 24px; }
.question-groups section {
  padding: 16px 8px 8px;
  border: 1px solid var(--key-edge); border-radius: 12px; background: var(--bg); box-shadow: 0 3px 0 var(--key-edge);
}
/* SELECT holds half the questions, so it spans the row in its own columns */
.question-groups section:first-child { grid-column: 1 / -1; }
.question-groups section:first-child ul { columns: 3; column-gap: 8px; }
.question-groups h3 { padding: 0 8px; }
.question-groups h3 span { margin-left: 6px; color: var(--text-dim); font-weight: 400; font-size: 13px; }
.question-groups p { padding: 0 8px 8px; font-size: 14px; line-height: 20px; }
.question-groups li { break-inside: avoid; }
.question-groups a { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--text); font-size: 14px; line-height: 20px; text-decoration: none; }
.question-groups a:hover { background: var(--surface-2); text-decoration: underline; text-underline-offset: 3px; }
/* Bars for the eye; the word stays for screen readers and crawlers */
.level { --on: var(--edge-solved); --n: 1; flex: none; width: 28px; height: 8px; overflow: hidden; text-indent: 40px; white-space: nowrap;
  background: linear-gradient(90deg, var(--on) calc(var(--n) * 10px), var(--surface-3) 0);
  mask: repeating-linear-gradient(90deg, #000 0 8px, transparent 8px 10px); }
.level[data-level="medium"] { --on: var(--edge-go); --n: 2; }
.level[data-level="hard"] { --on: var(--edge-reveal); --n: 3; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 16px; }
.databases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin: 16px 0 20px; line-height: 30px; }
.home-guides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 12px; margin-top: 16px; }
.home-guides a {
  display: block; padding: 12px 16px; color: var(--text); font-size: 15px; line-height: 22px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--key-edge); border-radius: 12px; background: var(--bg); box-shadow: 0 3px 0 var(--key-edge);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.home-guides a:hover { border-color: var(--edge-go); transform: translateY(-1px); box-shadow: 0 4px 0 var(--edge-go); }
.home-guides a:active { transform: translateY(3px); box-shadow: none; }
.faq h3 { margin-top: 20px; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding: 24px; border-top: 1px solid var(--border); font-size: 13px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 1100px) { .question-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .app { height: auto; min-height: 0; }
  .brand-line { display: contents; }
  .brand-line h1 { display: block; grid-row: 3; grid-column: 1 / -1; white-space: normal; text-align: center; }
  .home { padding: 32px 16px 56px; }
  .home > section + section { margin-top: 48px; }
  .question-groups { grid-template-columns: 1fr; }
  .question-groups section:first-child ul { columns: 1; }
  .question-groups a { min-height: 44px; align-items: center; }
  .steps, .databases { grid-template-columns: 1fr; gap: 16px; }
  .home-guides { grid-template-columns: 1fr 1fr; }
  .site-footer a { padding: 12px 0; }
}
