.spec-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.spec-notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.spec-notice a {
  color: var(--accent);
  text-decoration: none;
}

.spec-notice a:hover {
  text-decoration: underline;
}

.heading-anchor {
  color: var(--accent);
  text-decoration: none;
  opacity: 0;
  font-weight: 400;
  margin-left: -1.25em;
  padding-right: 0.25em;
  position: absolute;
  transition: opacity 0.15s;
}

h2:hover .heading-anchor,
h3:hover .heading-anchor {
  opacity: 1;
}

.spec-page h2,
.spec-page h3 {
  position: relative;
  padding-left: 1.25em;
}

.spec-page h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.spec-page h3 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.spec-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 600;
}

.spec-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
}

.spec-table .status-done {
  color: #4ade80;
}

.spec-table .status-not-started {
  color: var(--text-dim);
}

.spec-status {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.instruction-detail {
  margin-bottom: 2rem;
}

.instruction-detail h4 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* WaveDrom dark theme overrides */
.instruction-detail svg text {
  fill: var(--text) !important;
}

.instruction-detail svg .s1,
.instruction-detail svg .s2,
.instruction-detail svg .s3,
.instruction-detail svg .s4 {
  stroke: var(--text-dim) !important;
}

.instruction-detail svg .s5,
.instruction-detail svg .s7 {
  fill: var(--surface) !important;
}

.instruction-detail svg .s6 {
  fill: var(--text) !important;
}

.instruction-detail svg .s8  { fill: #4a4520 !important; }
.instruction-detail svg .s9  { fill: #4a3518 !important; }
.instruction-detail svg .s10 { fill: #1a3550 !important; }
.instruction-detail svg .s11 { fill: #1a4545 !important; }
.instruction-detail svg .s12 { fill: #1a4520 !important; }
.instruction-detail svg .s13 { fill: #3a1a45 !important; }
.instruction-detail svg .s14 { fill: #451a1a !important; }

.sail-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0.5rem 0 1.5rem 0;
  white-space: pre;
}
