.idea-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 720px) {
  .idea-grid { grid-template-columns: 1fr; }
}

.idea-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--surface2);
  font-size: 0.88rem;
}

.idea-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.ctrl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.ctrl-row select {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.code-box {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0 0 0.55rem;
  padding: 0.75rem 0.85rem;
  background: #1a222c;
  color: #e8eef4;
  border-radius: 8px;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}

.map-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.map-table th,
.map-table td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--line);
}

.map-table th {
  font-size: 0.72rem;
  color: var(--muted);
}

.map-table tr.bad td {
  background: #fef2f2;
  color: var(--err);
}

.map-table tr.ok td {
  background: #ecfdf5;
}

.map-table select {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.verdict {
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 0.55rem;
}

.verdict.ok {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}

.verdict.bad {
  border-color: var(--err);
  background: var(--err-bg);
  color: var(--err);
}

.schem-svg {
  width: 100%;
  min-height: 140px;
  background: #1a222c;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 0.55rem;
}

.action-grid {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.action-grid button {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.action-grid button:hover { border-color: var(--accent); }

.trace-box,
.log-box {
  font-family: var(--mono);
  font-size: 0.78rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #1a222c;
  color: #e8eef4;
  border-radius: 8px;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}

.trace-box { min-height: 5rem; margin-bottom: 0.55rem; }
.log-box {
  min-height: 5rem;
  max-height: 9rem;
  overflow: auto;
}

.trace-box .ok,
.log-box .ok { color: #8fd4a8; }
.trace-box .warn,
.log-box .warn { color: #f0c674; }
.trace-box .muted,
.log-box .muted { color: #7a8a9a; }
.trace-box .hi,
.log-box .run { color: #9ecbff; }
.trace-box .bad { color: #f0a0a0; }

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cheat-table th,
.cheat-table td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.hint-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint-list li { margin: 0.35rem 0; }

.legend {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.port-order {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--line);
  margin-bottom: 0.55rem;
}
