:root {
  --bg: #0b0f1a;
  --surface: #151b2b;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #7c5cff;
  --accent: #22d3ee;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 16px;
}

h1 {
  font-size: 36px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

p {
  margin-top: 0;
  margin-bottom: 16px;
  max-width: 70ch;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 16px;
  background: #6642f5;
  color: #ffffff;
  border-radius: 12px;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(154, 164, 184, 0.16);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--text);
}


.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(124, 92, 255, 0.16);
  text-decoration: none;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 12px;
  background: var(--accent);
  display: inline-block;
}

.workbench-hero {
  padding-top: 24px;
  padding-bottom: 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-header {
  margin-bottom: 24px;
}

.hero-header h1 {
  margin-bottom: 8px;
}

.hero-lead {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 0;
  max-width: 70ch;
}

.section-block {
  padding-top: 64px;
  padding-bottom: 64px;
}

.surface-band {
  background: var(--surface);
  border-top: 1px solid rgba(154, 164, 184, 0.14);
  border-bottom: 1px solid rgba(154, 164, 184, 0.14);
}

.section-header {
  margin-bottom: 32px;
}

.section-sub {
  color: var(--muted);
  margin-bottom: 0;
}

.btn-primary,
.btn-secondary,
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: #6642f5;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.btn-primary:hover {
  filter: brightness(0.92);
  text-decoration: none;
  color: #ffffff;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(154, 164, 184, 0.28);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}


.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.wb-stage {
  position: relative;
  background: var(--bg);
  border: 1px solid rgba(124, 92, 255, 0.34);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  overflow: hidden;
  min-height: 448px;
  display: flex;
  flex-direction: column;
}

.wb-canvas-wrap {
  position: relative;
  width: 100%;
  height: 448px;
  background: var(--bg);
}

.wb-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.wb-hud-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}

.wb-pill {
  background: rgba(21, 27, 43, 0.9);
  border: 1px solid rgba(154, 164, 184, 0.24);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.wb-pill-accent {
  border-color: rgba(34, 211, 238, 0.45);
  color: var(--accent);
}

.wb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid rgba(154, 164, 184, 0.16);
  flex-wrap: wrap;
}

.wb-tool-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-mini-btn {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid rgba(154, 164, 184, 0.24);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.wb-mini-btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

.wb-hint {
  font-size: 12px;
  color: var(--muted);
}

.wb-panel {
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wb-dropzone {
  border: 1px dashed rgba(124, 92, 255, 0.5);
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wb-dropzone.is-drag {
  border-color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
}

.wb-drop-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.wb-drop-sub {
  font-size: 12px;
  color: var(--muted);
}

.wb-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-btn-row > * {
  flex: 1 1 auto;
}


.wb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wb-kpi {
  background: var(--bg);
  border: 1px solid rgba(154, 164, 184, 0.16);
  border-radius: 12px;
  padding: 12px;
}

.wb-kpi-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.wb-kpi-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.wb-kpi-val.is-accent {
  color: var(--accent);
}

.wb-kpi-val.is-warn {
  color: var(--primary);
}

.wb-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wb-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.input-field,
.select-field {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid rgba(154, 164, 184, 0.28);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.textarea-field {
  min-height: 96px;
  resize: vertical;
}

.range-field {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.wb-status-box {
  background: var(--bg);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
}

.wb-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wb-diff-table th,
.wb-diff-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(154, 164, 184, 0.14);
}

.wb-diff-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.engage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.16);
  border-radius: 12px;
  flex-wrap: wrap;
}

.engage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.engage-btn[data-gf-liked],
.engage-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(34, 211, 238, 0.12);
}

.count-pill {
  font-weight: 600;
  color: var(--accent);
}

.privacy-note,
.share-feedback {
  font-size: 12px;
  color: var(--muted);
}

.algo-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.algo-card {
  background: var(--bg);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.algo-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.algo-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.18);
  color: var(--accent);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.algo-title {
  margin-bottom: 0;
}

.algo-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.algo-spec {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}


.split-prose-table {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: start;
}

.check-list {
  padding-left: 24px;
  margin-top: 0;
  margin-bottom: 0;
  color: var(--muted);
}

.check-list li {
  margin-bottom: 8px;
  max-width: 70ch;
}

.split-table-wrap {
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(154, 164, 184, 0.14);
  vertical-align: top;
}

.data-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.status-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

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

.suite-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 24px;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.suite-card:hover,
.suite-card.is-current {
  border-color: var(--primary);
  text-decoration: none;
}

.suite-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.suite-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.suite-arrow {
  color: var(--primary);
  font-weight: 600;
}

.suite-title {
  margin-bottom: 4px;
  color: var(--text);
}

.suite-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 0;
}

.prose-content {
  max-width: 70ch;
}

.prose-content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.prose-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

.prose-content ul,
.prose-content ol {
  padding-left: 24px;
  margin-top: 0;
  margin-bottom: 16px;
}

.prose-content li {
  margin-bottom: 8px;
}

.prose-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: 14px;
}

.prose-content th,
.prose-content td {
  padding: 12px;
  border: 1px solid rgba(154, 164, 184, 0.18);
  text-align: left;
}

.prose-content th {
  background: var(--surface);
  color: var(--text);
}


.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 70ch;
}

.faq-item {
  background: var(--bg);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 16px 24px;
}

.faq-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.faq-answer {
  margin-top: 12px;
  color: var(--muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.comments-shell {
  max-width: 70ch;
}

.comment-form {
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-form:not([data-gf-replying]) [data-gf-reply-cancel],
.comment-form:not([data-gf-replying]) [data-gf-reply-to] {
  display: none;
}

.reply-banner {
  font-size: 14px;
  color: var(--accent);
}

.comment-msg {
  font-size: 14px;
  color: var(--accent);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comments-list[data-gf-empty]::before {
  content: "No maker notes yet — share your printer model or STL repair feedback above.";
  display: block;
  padding: 16px;
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.14);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}

.comment-item {
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.16);
  border-radius: 12px;
  padding: 16px;
}

.comment-item[data-gf-owner] {
  border-color: var(--primary);
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  flex-wrap: wrap;
}

.owner-badge {
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.22);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.comment-time,
.reply-target {
  font-size: 12px;
  color: var(--muted);
}

.comment-body {
  margin-bottom: 8px;
}

.text-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.comment-replies {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid rgba(124, 92, 255, 0.35);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid rgba(154, 164, 184, 0.18);
  border-radius: 12px;
  padding: 32px;
}

.legal-updated {
  font-size: 14px;
  color: var(--muted);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid rgba(154, 164, 184, 0.16);
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-heading {
  font-size: 16px;
  margin-bottom: 12px;
}

.footer-desc,
.footer-meta {
  font-size: 14px;
  color: var(--muted);
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  color: var(--muted);
  font-size: 14px;
}

.footer-list a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(154, 164, 184, 0.14);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .wb-grid,
  .split-prose-table,
  .suite-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .section-block {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .wb-grid,
  .algo-grid-2x2,
  .split-prose-table,
  .suite-grid,
  .footer-grid,
  .wb-kpi-grid {
    grid-template-columns: 1fr;
  }

  .wb-stage {
    min-height: 320px;
  }

  .wb-canvas-wrap {
    height: 320px;
  }

  .wb-panel,
  .legal-card {
    padding: 16px;
  }

  .wb-btn-row > *,
  .comment-form-actions .btn-primary,
  .comment-form-actions .btn-secondary {
    width: 100%;
  }
}
