:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --ink: #1d2329;
  --muted: #68717a;
  --line: #d9ded8;
  --panel: #ffffff;
  --accent: #196f63;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 16px; }
p { color: var(--muted); }

.button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  padding: 9px 12px;
  text-decoration: none;
  background: #fff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 16px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.tree, .tree ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tree > li {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

summary a {
  color: var(--accent);
  font-size: 13px;
}

.question {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
}

.question-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.question-head span {
  overflow-wrap: anywhere;
}

.question img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: top left;
  background: #eef0ec;
  border: 1px solid var(--line);
  border-radius: 6px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f2f4f0;
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0 0;
  color: #2c343b;
  font-size: 12px;
  line-height: 1.45;
}

.logs {
  max-height: calc(100vh - 110px);
  overflow: auto;
}

.log {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.log time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.log strong {
  color: var(--accent);
}

.empty {
  padding: 32px 0;
}

.page-detail {
  display: grid;
  grid-template-columns: minmax(280px, 52vw) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.page-image {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 960px) {
  .layout,
  .page-detail {
    grid-template-columns: 1fr;
  }

  .logs {
    max-height: none;
  }
}
