@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Manrope:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

.public-home {
  background:
    radial-gradient(1200px 700px at 8% -10%, rgba(198, 108, 31, 0.18), transparent 48%),
    radial-gradient(960px 560px at 100% 8%, rgba(12, 122, 112, 0.22), transparent 42%),
    linear-gradient(180deg, #f4ede2 0%, #efe6d9 36%, #e6eceb 100%);
  color: #1d2327;
}

.public-home .bg-layer {
  display: none;
}

.public-home-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(36, 55, 63, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 55, 63, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 28%, black 24%, transparent 78%);
  opacity: 0.6;
}

.public-home-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 2.4vw, 30px) 34px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 53, 60, 0.14);
  border-radius: 22px;
  background: rgba(255, 251, 247, 0.78);
  box-shadow: 0 18px 44px rgba(43, 49, 54, 0.1);
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #fffaf4;
  background:
    linear-gradient(150deg, #0c7a70 0%, #184e61 58%, #c26c22 100%);
  box-shadow: 0 12px 24px rgba(12, 122, 112, 0.22);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: #6c777d;
  font-size: 0.76rem;
}

.landing-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.landing-links a,
.landing-footer-links a {
  color: #34444a;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
}

.landing-links a:hover,
.landing-footer-links a:hover {
  color: #0c7a70;
}

.nav-cta,
.hero-btn {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.nav-cta {
  color: #fffaf4;
  background: linear-gradient(135deg, #0c7a70 0%, #1b596d 100%);
  box-shadow: 0 12px 24px rgba(12, 122, 112, 0.2);
}

.nav-cta:hover,
.hero-btn:hover {
  transform: translateY(-1px);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-copy {
  padding: 16px 4px 12px;
}

.hero-kicker,
.section-label {
  margin: 0 0 12px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(194, 108, 34, 0.3);
  background: rgba(194, 108, 34, 0.08);
  color: #9c591e;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.93;
  color: #182227;
  text-wrap: balance;
}

.hero-lead {
  max-width: 640px;
  margin: 0;
  color: #54656d;
  font-size: 1.05rem;
  line-height: 1.72;
}

.hero-actions,
.bottom-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-btn-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, #c26c22 0%, #8f4a16 100%);
  box-shadow: 0 18px 34px rgba(161, 84, 24, 0.22);
}

.hero-btn-secondary {
  color: #19343c;
  background: rgba(255, 251, 246, 0.72);
  border: 1px solid rgba(37, 58, 65, 0.16);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.82);
  border: 1px solid rgba(36, 58, 65, 0.1);
  color: #48585f;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  padding: 20px;
  border-radius: 36px;
  border: 1px solid rgba(34, 53, 60, 0.12);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.78), transparent 34%),
    linear-gradient(145deg, rgba(16, 42, 52, 0.96) 0%, rgba(17, 72, 78, 0.92) 52%, rgba(195, 104, 31, 0.76) 100%);
  box-shadow: 0 32px 68px rgba(30, 43, 51, 0.2);
  overflow: hidden;
}

.stage-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 247, 238, 0.16);
}

.stage-orbit-a {
  width: 460px;
  height: 460px;
  right: -70px;
  top: -46px;
}

.stage-orbit-b {
  width: 320px;
  height: 320px;
  left: -80px;
  bottom: -70px;
}

.phone-frame {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  margin: 26px auto 0;
  padding: 14px;
  border-radius: 38px;
  background: linear-gradient(180deg, #121a1f 0%, #243139 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(9, 17, 21, 0.46);
}

.phone-topbar {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-bottom: 10px;
}

.phone-topbar span {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.phone-screen {
  border-radius: 28px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 8%, rgba(194, 108, 34, 0.14), transparent 28%),
    linear-gradient(180deg, #fff8ef 0%, #f3ece2 100%);
  display: grid;
  gap: 14px;
}

.screen-head p,
.screen-card span,
.screen-mini span,
.screen-list span {
  margin: 0;
  color: #6b7074;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.screen-head strong,
.screen-card strong,
.screen-mini strong,
.screen-list strong {
  display: block;
  margin-top: 4px;
  color: #192227;
}

.screen-card,
.screen-mini,
.screen-list > div {
  border-radius: 20px;
  border: 1px solid rgba(44, 58, 64, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.screen-card {
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.screen-card-accent {
  background: linear-gradient(135deg, rgba(12, 122, 112, 0.14) 0%, rgba(194, 108, 34, 0.12) 100%);
}

.screen-card b {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff8ef;
  background: linear-gradient(135deg, #0c7a70 0%, #144d5f 100%);
}

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

.screen-mini {
  padding: 12px;
}

.screen-mini strong {
  font-size: 1.2rem;
}

.screen-bars {
  display: grid;
  gap: 8px;
  width: 100%;
}

.screen-bars i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0c7a70, #c26c22);
}

.screen-bars i:nth-child(2) {
  width: 82%;
}

.screen-bars i:nth-child(3) {
  width: 66%;
}

.screen-list {
  display: grid;
  gap: 8px;
}

.screen-list > div {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-float {
  position: absolute;
  z-index: 3;
  max-width: 230px;
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 250, 245, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 32px rgba(15, 31, 38, 0.22);
}

.stage-float span {
  display: block;
  color: #8b551f;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-float strong {
  display: block;
  margin-top: 6px;
  line-height: 1.3;
}

.stage-float-left {
  left: 18px;
  top: 104px;
}

.stage-float-right {
  right: 18px;
  bottom: 96px;
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.signal-band article,
.feature-card,
.workflow-step,
.audience-panel,
.stats-panel,
.faq-stack article,
.bottom-cta {
  border: 1px solid rgba(35, 53, 61, 0.12);
  border-radius: 28px;
  background: rgba(255, 251, 247, 0.82);
  box-shadow: 0 18px 38px rgba(34, 42, 48, 0.08);
}

.signal-band article {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.signal-band span,
.feature-index,
.workflow-step span,
.stat-block span {
  color: #9c591e;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-band strong {
  font-size: 1.02rem;
  line-height: 1.35;
}

.feature-section,
.workflow-section,
.audience-section,
.faq-section {
  margin-top: 16px;
}

.section-intro {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.section-intro h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 0.98;
  max-width: 760px;
}

.section-intro p {
  margin: 0;
  max-width: 780px;
  color: #57666c;
  font-size: 0.98rem;
  line-height: 1.72;
}

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

.feature-card {
  grid-column: span 4;
  padding: 22px;
}

.feature-card-large {
  grid-column: span 6;
}

.feature-card-accented {
  background:
    linear-gradient(145deg, rgba(12, 122, 112, 0.14) 0%, rgba(255, 251, 247, 0.88) 100%);
}

.feature-card h3,
.workflow-step h3,
.faq-stack h3 {
  margin: 10px 0 10px;
  font-size: 1.18rem;
  line-height: 1.2;
}

.feature-card p,
.workflow-step p,
.faq-stack p,
.audience-list li,
.stat-block strong {
  margin: 0;
  color: #56666d;
  line-height: 1.7;
}

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

.workflow-step {
  padding: 22px;
}

.audience-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.audience-panel,
.stats-panel,
.faq-stack article,
.bottom-cta {
  padding: 24px;
}

.audience-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.stats-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(21, 51, 63, 0.98) 0%, rgba(19, 73, 80, 0.94) 100%);
}

.stat-block {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 248, 241, 0.08);
  border: 1px solid rgba(255, 252, 247, 0.12);
}

.stats-panel .stat-block span {
  color: rgba(255, 225, 195, 0.78);
}

.stats-panel .stat-block strong {
  display: block;
  margin-top: 8px;
  color: #fff8f1;
}

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

.faq-stack a {
  color: #0c7a70;
  font-weight: 800;
  text-decoration: none;
}

.faq-stack a:hover {
  text-decoration: underline;
}

.bottom-cta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(15, 52, 63, 0.98) 0%, rgba(24, 79, 82, 0.94) 64%, rgba(194, 108, 34, 0.82) 100%);
}

.bottom-cta h2 {
  max-width: 620px;
  margin: 0;
  color: #fff8ef;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.02;
}

.bottom-cta .section-label {
  color: rgba(255, 220, 188, 0.96);
  border-color: rgba(255, 222, 194, 0.18);
  background: rgba(255, 242, 231, 0.09);
}

.bottom-cta .hero-btn-primary {
  background: linear-gradient(135deg, #fff4e9 0%, #ffe4ce 100%);
  color: #7e4517;
  box-shadow: none;
}

.bottom-cta .hero-btn-secondary {
  color: #fff8ef;
  border-color: rgba(255, 246, 236, 0.22);
  background: rgba(255, 248, 241, 0.08);
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 10px 4px 0;
}

.landing-footer-brand {
  display: grid;
  gap: 4px;
}

.landing-footer-brand strong {
  font-size: 0.94rem;
}

.landing-footer-brand span {
  color: #6b777d;
  font-size: 0.78rem;
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

:root {
  --bg-0: #f7f5ef;
  --bg-1: #edf2f4;
  --bg-2: #ece7da;
  --ink: #182229;
  --ink-soft: #556771;
  --ink-muted: #70828d;
  --paper: #fffdfa;
  --metal: #eff3f6;
  --line: #cfd9df;
  --line-strong: #b7c5cd;
  --accent: #0c7a70;
  --accent-soft: #d9efe9;
  --accent-strong: #085a53;
  --amber: #b6802a;
  --warn: #b84f3a;
  --shadow: 0 14px 34px rgba(20, 41, 51, 0.12);
  --shadow-lg: 0 28px 58px rgba(20, 41, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1400px 700px at 12% -15%, rgba(18, 110, 104, 0.17), transparent 45%),
    radial-gradient(1000px 560px at 92% 118%, rgba(186, 137, 51, 0.16), transparent 40%),
    linear-gradient(125deg, var(--bg-0) 0%, var(--bg-1) 44%, var(--bg-2) 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(31, 71, 86, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 71, 86, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 45%, black 30%, transparent 100%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 16px clamp(10px, 2vw, 28px) 24px;
  padding-left: max(clamp(10px, 2vw, 28px), env(safe-area-inset-left));
  padding-right: max(clamp(10px, 2vw, 28px), env(safe-area-inset-right));
}

.hero {
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background:
    linear-gradient(136deg, rgba(255, 255, 255, 0.94) 0%, rgba(243, 247, 250, 0.86) 100%);
  box-shadow: var(--shadow-lg);
  padding: 18px clamp(14px, 2.2vw, 26px);
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -42px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 20px solid rgba(12, 122, 112, 0.08);
  transform: rotate(14deg);
}

.eyebrow {
  margin: 0;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(12, 122, 112, 0.35);
  background: rgba(12, 122, 112, 0.08);
  color: var(--accent-strong);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(1.26rem, 3.2vw, 2.25rem);
  letter-spacing: 0.01em;
  line-height: 1.08;
}

.subtitle {
  margin: 0;
  max-width: 920px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.convert-layout {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.controls-panel,
.preview-panel {
  padding: 16px;
  min-width: 0;
}

.controls-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 252, 252, 0.9) 100%);
}

.controls-panel h2,
.preview-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.panel-note,
.preview-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span,
.scale-controls > span {
  font-family: 'Space Mono', monospace;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

select,
input,
button,
.download-link {
  font: inherit;
}

select,
input[type='text'],
input[type='number'],
input[type='file'] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

select:focus,
input[type='text']:focus,
input[type='number']:focus,
input[type='file']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(12, 122, 112, 0.16);
}

input[type='number'] {
  text-align: center;
}

button,
.download-link {
  min-height: 42px;
  border: 1px solid rgba(21, 55, 66, 0.24);
  border-radius: 11px;
  padding: 10px 11px;
  background:
    linear-gradient(180deg, #ffffff 0%, #ecf3f7 100%);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

button:hover,
.download-link:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 122, 112, 0.52);
  box-shadow: 0 8px 16px rgba(12, 87, 92, 0.15);
}

button:active,
.download-link:active {
  transform: translateY(0);
}

button:disabled,
.download-link.disabled {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

#generateModelBtn,
#saveBtn,
#applyPatternBtn,
#loadBtn,
#stlZoomInBtn,
#stlZoomOutBtn,
#gcodeZoomInBtn,
#gcodeZoomOutBtn {
  border-color: rgba(12, 122, 112, 0.45);
  background: linear-gradient(180deg, #f2fbf8 0%, #dff2ec 100%);
}

.inline-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.inline-controls > * {
  min-width: 0;
}

.pattern-controls {
  grid-template-columns: minmax(0, 1fr) auto;
}

.saved-inline-controls {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.saved-inline-controls button {
  min-width: 72px;
}

.compact-field .inline-controls button {
  white-space: nowrap;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-row.one-col {
  grid-template-columns: minmax(0, 1fr);
}

.model-panel {
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed rgba(12, 122, 112, 0.38);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(240, 249, 247, 0.95) 0%, rgba(247, 251, 250, 0.92) 100%);
  display: grid;
  gap: 10px;
  min-width: 0;
}

.model-panel h3 {
  margin: 0;
  font-family: 'Space Mono', monospace;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-strong);
}

.stl-preview-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, #e9f1f5 0%, #f2ede3 100%);
  padding: 8px;
  overflow: hidden;
}

.stl-zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: grid;
  gap: 6px;
}

.stl-zoom-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 10px;
  padding: 0;
  font-family: 'Space Mono', monospace;
  font-size: 1.15rem;
  line-height: 1;
}

#stlPreviewCanvas {
  touch-action: pan-y;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 18%, rgba(10, 46, 56, 0.1), transparent 40%),
    linear-gradient(160deg, rgba(27, 120, 114, 0.11), rgba(215, 179, 111, 0.14));
}

#convertModelCanvas {
  touch-action: pan-y;
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background:
    radial-gradient(circle at 20% 18%, rgba(10, 46, 56, 0.1), transparent 40%),
    linear-gradient(160deg, rgba(27, 120, 114, 0.11), rgba(215, 179, 111, 0.14));
}

.gcode-preview-wrap {
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, #f6fafb 0%, #eff4f0 100%);
  padding: 9px;
  display: grid;
  gap: 8px;
}

.gcode-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gcode-preview-head > span {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.gcode-zoom-controls {
  display: flex;
  gap: 6px;
}

.gcode-zoom-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
  padding: 0;
  font-family: 'Space Mono', monospace;
  font-size: 1.02rem;
}

#gcodePreviewCanvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(98, 118, 127, 0.2);
  touch-action: pan-y;
  background:
    radial-gradient(circle at 18% 18%, rgba(10, 46, 56, 0.08), transparent 38%),
    linear-gradient(160deg, rgba(19, 72, 84, 0.08), rgba(228, 209, 167, 0.18));
}

#convertGcodeCanvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(98, 118, 127, 0.2);
  touch-action: pan-y;
  background:
    radial-gradient(circle at 18% 18%, rgba(10, 46, 56, 0.08), transparent 38%),
    linear-gradient(160deg, rgba(19, 72, 84, 0.08), rgba(228, 209, 167, 0.18));
}

.preview-surface.is-hidden {
  display: none;
}

.gcode-layer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.gcode-layer-row label,
#gcodeLayerLabel {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

#gcodeLayerRange {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

.gcode-meta {
  margin: 0;
  min-height: 1.2em;
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.35;
}

.gcode-meta.warn {
  color: var(--warn);
}

.spec-box {
  border: 1px dashed rgba(47, 82, 95, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fcfd 0%, #f4f8fa 100%);
  padding: 10px 12px;
  min-height: 104px;
  color: var(--ink-soft);
  font-family: 'Space Mono', monospace;
  font-size: 0.73rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.spec-box a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 700;
}

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

.status {
  margin: 0;
  min-height: 1.25em;
  color: var(--accent-strong);
  font-size: 0.84rem;
}

.status.warn {
  color: var(--warn);
}

.preview-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(249, 251, 252, 0.9) 100%);
}

.preview-head {
  display: grid;
  gap: 4px;
}

.canvas-wrap {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, #fffef8 0%, #f4ece2 100%);
  padding: 10px;
  overflow-x: auto;
  overflow-y: hidden;
}

#keyCanvas {
  touch-action: pan-y;
  width: auto;
  height: auto;
  display: block;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(214, 192, 149, 0.24), rgba(201, 176, 131, 0.34));
}

.keyboard-hint {
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f8fbfc;
  padding: 8px 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.on-screen-controls {
  width: min(300px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f2f8fa 100%);
}

.pad-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pad-btn {
  width: 100%;
  min-width: 0;
  font-family: 'Space Mono', monospace;
}

.scale-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 8px;
  align-items: center;
}

.scale-controls > span {
  grid-column: 1 / -1;
}

#scaleSlider {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

#scaleNumber {
  width: 92px;
}

.calibration-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-soft);
}

.inch-marker {
  width: 102px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(12, 122, 112, 0.27);
  background: linear-gradient(90deg, var(--accent), #85cfb9);
}

.pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.pin-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f3f7fa 100%);
  transition:
    border-color 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
}

.pin-btn strong {
  display: block;
  font-size: 0.94rem;
}

.pin-btn span {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: 'Space Mono', monospace;
  font-size: 0.71rem;
}

.pin-btn.active {
  border-color: rgba(12, 122, 112, 0.65);
  background: linear-gradient(180deg, #e7f7f2 0%, #dcefe8 100%);
  box-shadow: 0 6px 14px rgba(12, 122, 112, 0.2);
  transform: translateY(-1px);
}

.pin-btn.warn {
  border-color: rgba(184, 79, 58, 0.56);
}

.content-panel {
  margin-top: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 250, 251, 0.9) 100%);
}

.content-kicker {
  margin: 0;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(182, 128, 42, 0.36);
  background: rgba(182, 128, 42, 0.1);
  color: var(--amber);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.content-panel h2 {
  margin: 0;
  font-size: clamp(1.02rem, 2vw, 1.45rem);
  line-height: 1.2;
}

.content-intro {
  margin: 0;
  max-width: 980px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.7;
}

.content-grid,
.faq-list {
  display: grid;
  gap: 12px;
}

.content-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.content-card,
.faq-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 247, 249, 0.92) 100%);
}

.content-card h3,
.faq-item h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.content-card p,
.content-card li,
.faq-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.65;
}

.content-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.faq-item a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.faq-item a:hover {
  text-decoration: underline;
}

.legal-footer {
  margin-top: 12px;
  padding: 12px 8px 4px;
  border-top: 1px solid rgba(112, 130, 141, 0.28);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}

.legal-footer a {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.79rem;
  font-weight: 700;
}

.legal-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 1120px) {
  .layout-grid {
    grid-template-columns: 430px minmax(0, 1fr);
  }

  .convert-layout {
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  }

  .controls-panel {
    position: sticky;
    top: 14px;
    max-height: calc(100dvh - 28px);
    overflow: auto;
  }
}

@media (max-width: 1119px) {
  .landing-hero,
  .audience-section,
  .faq-stack,
  .workflow-rail,
  .signal-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card,
  .feature-card-large {
    grid-column: auto;
  }

  .bottom-cta,
  .landing-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .controls-panel {
    order: 2;
  }

  .preview-panel {
    order: 1;
  }

  .controls-panel .action-row,
  .controls-panel .inline-controls,
  .controls-panel .saved-inline-controls,
  .controls-panel .pattern-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .controls-panel .inline-controls > button,
  .controls-panel .inline-controls > input,
  .controls-panel .inline-controls > select,
  .controls-panel .action-row > button,
  .controls-panel .action-row > a {
    width: 100%;
    min-width: 0;
  }

  .controls-panel .gcode-layer-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .controls-panel #gcodeLayerLabel {
    justify-self: start;
  }

  .controls-panel .compact-field .inline-controls button {
    white-space: normal;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .public-home-shell {
    padding: 12px 10px 24px;
  }

  .landing-nav {
    padding: 12px;
    border-radius: 18px;
  }

  .landing-links {
    gap: 10px 14px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 14vw, 3.35rem);
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-stage {
    min-height: 520px;
    padding: 14px;
    border-radius: 28px;
  }

  .phone-frame {
    width: min(320px, 100%);
    padding: 12px;
  }

  .stage-float {
    position: static;
    max-width: none;
    margin-top: 12px;
  }

  .screen-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .audience-panel,
  .stats-panel,
  .faq-stack article,
  .feature-card,
  .workflow-step,
  .signal-band article,
  .bottom-cta {
    padding: 18px;
  }

  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell {
    padding: 12px 10px 18px;
  }

  .hero {
    padding: 14px 12px;
  }

  h1 {
    font-size: clamp(1.14rem, 6.3vw, 1.62rem);
  }

  .subtitle {
    font-size: 0.84rem;
  }

  .controls-panel,
  .preview-panel {
    padding: 12px;
  }

  .action-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .saved-inline-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .scale-controls {
    grid-template-columns: minmax(0, 1fr) 84px;
  }

  .scale-controls button {
    grid-column: 1 / -1;
  }

  .content-panel {
    padding: 14px 12px;
  }
}
