:root {
  --bg: #10151c;
  --bg-soft: #171e27;
  --panel: rgba(24, 31, 41, 0.95);
  --panel-strong: rgba(18, 24, 32, 0.98);
  --line: rgba(124, 149, 173, 0.18);
  --line-strong: rgba(124, 149, 173, 0.35);
  --text: #e4edf6;
  --muted: #9aaec1;
  --cyan: #46d3ff;
  --yellow: #ffd45c;
  --red: #ff7c7c;
  --green: #67e6ac;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Bahnschrift", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(70, 211, 255, 0.09), transparent 26%),
    radial-gradient(circle at bottom right, rgba(255, 212, 92, 0.06), transparent 22%),
    linear-gradient(180deg, #0d1218 0%, #141b23 100%);
  display: flex;
  flex-direction: column;
}

.cad-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(109, 125, 145, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 125, 145, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(70, 211, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 211, 255, 0.025) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px, 150px 150px, 150px 150px;
}

.page {
  position: relative;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 18px 44px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 20px 8px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 0.94;
  font-family: "BankGothic Md BT", "Bahnschrift", sans-serif;
}

.lead {
  max-width: 760px;
  margin: 16px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  gap: 12px;
  min-width: 260px;
}

.hero-chip {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: rgba(17, 24, 32, 0.78);
  box-shadow: var(--shadow);
}

.hero-chip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-chip strong {
  color: var(--yellow);
  font-size: 1.6rem;
}

.message,
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-strong) 100%);
  border-radius: 4px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.message {
  margin-bottom: 18px;
  padding: 14px 18px;
  font-weight: 700;
}

.message.error {
  color: #ffd6d6;
  border-color: rgba(255, 124, 124, 0.25);
  background: rgba(98, 24, 24, 0.35);
}

.message.warning {
  margin-top: 16px;
  color: #fff2b5;
  border-color: rgba(255, 212, 92, 0.25);
  background: rgba(96, 70, 18, 0.24);
}

.tab-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.tab-button,
.tool-toggle,
.ghost-button,
.download,
.primary,
.secondary {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(17, 24, 32, 0.92);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  text-decoration: none;
}

.tab-button {
  padding: 14px 20px;
  min-width: 170px;
  font-weight: 700;
}

.tab-button:hover,
.tool-toggle:hover,
.ghost-button:hover,
.download:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 211, 255, 0.38);
}

.tab-button.is-active,
.tool-toggle.is-active {
  color: #061117;
  border-color: rgba(70, 211, 255, 0.6);
  background: linear-gradient(180deg, rgba(70, 211, 255, 0.96), rgba(70, 211, 255, 0.8));
}

.tool-panel {
  display: none;
}

.tool-panel.is-active {
  display: block;
}

.panel {
  padding: 22px;
}

.panel-head,
.results-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-head h2,
.preview-card h3,
.advice-card h3 {
  margin: 0;
}

.panel-note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.tool-form {
  margin-top: 18px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 20px;
}

.editor-panel,
.controls-panel {
  min-width: 0;
}

.dropzone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 4px;
  border: 1px dashed var(--line-strong);
  background:
    linear-gradient(135deg, rgba(70, 211, 255, 0.08), transparent 45%),
    rgba(19, 26, 34, 0.92);
  cursor: pointer;
}

.dropzone input {
  display: none;
}

.dropzone-title {
  color: var(--cyan);
  font-size: 1.08rem;
  font-weight: 700;
}

.dropzone-subtitle {
  color: var(--muted);
  line-height: 1.5;
}

.editor-toolbar,
.brush-row,
.action-row,
.download-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.editor-toolbar {
  margin-top: 16px;
}

.tool-toggle,
.ghost-button,
.download,
.primary,
.secondary {
  padding: 12px 16px;
  font-weight: 700;
}

.ghost-button {
  color: var(--muted);
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.brush-row {
  margin-top: 14px;
}

.brush-row label,
.metric-label,
.metric-note,
.preview-note,
.summary-line {
  color: var(--muted);
}

.canvas-frame {
  position: relative;
  min-height: 420px;
  margin-top: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(rgba(72, 86, 102, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 86, 102, 0.14) 1px, transparent 1px),
    #0f141b;
  background-size: 26px 26px;
  display: grid;
  place-items: center;
}

#editor-canvas {
  display: none;
  max-width: 100%;
  max-height: 620px;
  object-fit: contain;
  cursor: crosshair;
}

#editor-canvas.is-ready {
  display: block;
}

#editor-canvas.crop-mode {
  cursor: cell;
}

.canvas-placeholder {
  max-width: 340px;
  padding: 28px;
  text-align: center;
  line-height: 1.7;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.option-group {
  display: grid;
  gap: 12px;
}

.controls-panel {
  display: grid;
  gap: 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.choice-grid.small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 82px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 30, 0.92);
  cursor: pointer;
}

.choice-card.wide {
  min-height: 112px;
}

.choice-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card input:checked + span,
.choice-card input:checked + strong {
  color: var(--cyan);
}

.choice-card:has(input:checked) {
  border-color: rgba(70, 211, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(70, 211, 255, 0.16) inset;
}

.choice-card small {
  color: var(--muted);
  line-height: 1.45;
}

.switches {
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(15, 22, 30, 0.82);
}

.switch-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.55;
}

.switch-row + .switch-row {
  margin-top: 12px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 30, 0.92);
}

.field-card span {
  color: var(--muted);
}

.field-help {
  color: var(--muted);
  line-height: 1.5;
}

.compare-panel {
  display: grid;
  gap: 16px;
}

.compare-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.compare-mode {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 30, 0.92);
}

.compare-mode__button {
  padding: 10px 14px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.compare-mode__button.is-active {
  border-color: rgba(70, 211, 255, 0.35);
  background: rgba(70, 211, 255, 0.12);
  color: var(--text);
}

.compare-view--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.overlay-compare {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 30, 0.92);
}

.overlay-compare img {
  display: block;
  width: 100%;
  height: auto;
}

.overlay-compare__base {
  filter: hue-rotate(150deg) saturate(1.35) brightness(1.08);
}

.overlay-compare__top {
  position: absolute;
  inset: 0;
  opacity: 0.65;
}

.overlay-compare__legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.overlay-compare__control {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(16, 22, 30, 0.92);
}

.overlay-compare__control span {
  color: var(--muted);
}

.overlay-compare__control output {
  color: var(--text);
}

.start-over-link {
  text-decoration: none;
}

input[type="number"],
input[type="text"],
input[type="range"] {
  width: 100%;
}

input[type="number"],
input[type="text"] {
  padding: 12px 14px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #0f141b;
  color: var(--text);
  font: inherit;
}

input[type="range"] {
  accent-color: var(--cyan);
}

.action-row {
  margin-top: 4px;
}

.primary {
  color: #061117;
  border-color: rgba(70, 211, 255, 0.6);
  background: linear-gradient(180deg, rgba(70, 211, 255, 0.98), rgba(70, 211, 255, 0.82));
}

.secondary,
.primary-link {
  color: #0c161d;
  border-color: rgba(255, 212, 92, 0.55);
  background: linear-gradient(180deg, rgba(255, 212, 92, 0.98), rgba(255, 212, 92, 0.82));
}

.ghost-link {
  color: var(--text);
}

.compact-form {
  display: grid;
  gap: 18px;
}

.trial-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 212, 92, 0.25);
  background: rgba(96, 70, 18, 0.18);
}

.trial-box strong {
  display: block;
  margin-bottom: 8px;
  color: #fff2b5;
}

.trial-box p,
.trial-box small {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.trial-box p + p,
.trial-box p + small {
  margin-top: 4px;
}

.trial-box--blocked {
  border-color: rgba(255, 124, 124, 0.24);
  background: rgba(98, 24, 24, 0.28);
}

.trial-box--blocked strong {
  color: #ffd4d4;
}

.upload-progress {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 4px;
  border: 1px solid rgba(70, 211, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(70, 211, 255, 0.12), rgba(255, 212, 92, 0.06)),
    rgba(11, 18, 25, 0.94);
  box-shadow: inset 0 0 0 1px rgba(70, 211, 255, 0.06);
}

.upload-progress__head,
.upload-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.upload-progress__head strong {
  color: var(--text);
}

.upload-progress__head span,
.upload-progress__meta span {
  color: var(--muted);
}

.upload-progress__bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.upload-progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: progress-sheen 1.8s linear infinite;
}

.upload-progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(70, 211, 255, 0.88), rgba(255, 212, 92, 0.92));
  box-shadow: 0 0 24px rgba(70, 211, 255, 0.28);
  transition: width 0.25s ease;
}

.upload-progress__pulse {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 212, 92, 0.95);
  box-shadow: 0 0 0 0 rgba(255, 212, 92, 0.55);
  animation: progress-pulse 1.5s ease-out infinite;
}

.progress-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.progress-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(6px);
}

.progress-modal__card {
  position: relative;
  width: min(100%, 560px);
  padding: 22px;
  border-radius: 5px;
  border: 1px solid rgba(70, 211, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(18, 27, 36, 0.98), rgba(11, 18, 25, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.progress-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.progress-modal__head h3 {
  margin: 6px 0 0;
}

.progress-modal__bar {
  margin-top: 16px;
}

.progress-modal__stage {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.progress-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.progress-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.72;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.progress-step strong,
.progress-step span {
  display: block;
}

.progress-step span:last-child {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.progress-step__badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
}

.progress-step.is-active {
  opacity: 1;
  transform: translateY(-1px);
  border-color: rgba(70, 211, 255, 0.34);
  background: rgba(70, 211, 255, 0.08);
}

.progress-step.is-active .progress-step__badge {
  border-color: rgba(70, 211, 255, 0.5);
  background: rgba(70, 211, 255, 0.16);
  color: var(--text);
}

.progress-step.is-complete {
  opacity: 1;
  border-color: rgba(121, 210, 105, 0.28);
  background: rgba(121, 210, 105, 0.08);
}

.progress-step.is-complete .progress-step__badge {
  border-color: rgba(121, 210, 105, 0.4);
  background: rgba(121, 210, 105, 0.16);
}

@keyframes progress-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 212, 92, 0.55);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(255, 212, 92, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 212, 92, 0);
  }
}

@keyframes progress-sheen {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.result-block {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.batch-results {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.batch-card {
  padding: 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.9);
}

.batch-card__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.batch-card__head h3 {
  margin: 0;
}

.batch-metrics {
  margin-top: 16px;
}

.results-head h2 {
  margin: 6px 0 0;
}

.metrics,
.preview-grid,
.advice-grid {
  display: grid;
  gap: 14px;
}

.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.metric-card,
.preview-card,
.advice-card {
  padding: 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 26, 0.9);
}

.metric-card {
  display: grid;
  gap: 10px;
}

.metric-value {
  font-size: 1.28rem;
}

.preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.preview-grid.single,
.advice-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.preview-card img {
  width: 100%;
  margin-top: 14px;
  border-radius: 2px;
  border: 1px solid rgba(118, 148, 173, 0.15);
  background: #0d1218;
  min-height: 230px;
  object-fit: contain;
}

.preview-note {
  margin: 10px 0 0;
  line-height: 1.5;
}

.advice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.advice-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

.advice-card p {
  line-height: 1.65;
}

.summary-line {
  margin: 14px 0 0;
}

@media (max-width: 1120px) {
  .hero {
    flex-direction: column;
  }

  .hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-layout,
  .metrics,
  .preview-grid,
  .advice-grid,
  .field-grid.triple,
  .compare-view--split {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 18px 12px 28px;
  }

  .panel {
    padding: 16px;
  }

  .tab-row,
  .hero-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .tab-row {
    display: grid;
  }

  .choice-grid,
  .choice-grid.small {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare-panel__head,
  .overlay-compare__legend {
    flex-direction: column;
  }

  .canvas-frame {
    min-height: 300px;
  }

  .upload-progress__head,
  .upload-progress__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-modal {
    padding: 14px;
  }

  .progress-modal__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .progress-step {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 10px 12px;
  }
}

/* Local calculator theme override */
:root {
  --bg: #1e1e1e;
  --panel: #2a2a2a;
  --panel2: #242424;
  --panel3: #1a1a1a;
  --text: #f1f1f1;
  --muted: #bdbdbd;
  --green: #19ff19;
  --red: #ff2a2a;
  --line: #4a4a4a;
  --btn: #1d8f1d;
  --btn2: #3a3a3a;
  --shadow: none;
}

body {
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
}

.cad-grid {
  background-image:
    linear-gradient(rgba(110, 110, 110, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 110, 110, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(25, 255, 25, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 255, 25, 0.035) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px, 140px 140px, 140px 140px;
}

.page {
  max-width: 1100px;
  margin: 18px auto;
  padding: 0 14px 24px;
}

.hero {
  gap: 10px;
  margin-bottom: 12px;
  padding: 0;
}

.eyebrow {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  font-size: 24px;
  line-height: 1.15;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.lead {
  max-width: 760px;
  margin: 8px 0 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: 14px;
}

.hero-stats {
  min-width: 220px;
}

.hero-chip {
  gap: 6px;
  padding: 10px 12px;
  border-radius: 2px;
  border: 1px solid #3b3b3b;
  background: #101010;
  box-shadow: none;
}

.hero-chip strong {
  color: var(--green);
  font-size: 1.4rem;
}

.message,
.panel,
.choice-card,
.switches,
.field-card,
.metric-card,
.preview-card,
.advice-card,
.canvas-frame,
.dropzone {
  border: 1px solid #3b3b3b;
  background: var(--panel);
  border-radius: 2px;
  box-shadow: none;
  backdrop-filter: none;
}

.panel,
.message,
.choice-card,
.switches,
.field-card,
.metric-card,
.preview-card,
.advice-card {
  padding: 12px;
}

.panel {
  padding: 12px;
}

.message.error {
  color: #ffd6d6;
  border-color: #6d3a3a;
  background: rgba(80, 28, 28, 0.45);
}

.message.warning {
  color: #fff2b5;
  border-color: #6e6035;
  background: rgba(92, 74, 24, 0.38);
}

.tab-button,
.tool-toggle,
.ghost-button,
.download,
.primary,
.secondary,
.primary-link {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--btn2);
  color: #fff;
  transition: none;
  box-shadow: none;
}

.tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-button,
.primary,
.secondary,
.primary-link,
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tab-button:hover,
.tool-toggle:hover,
.ghost-button:hover,
.download:hover,
.primary:hover,
.secondary:hover,
.primary-link:hover {
  transform: none;
  filter: brightness(1.05);
  border-color: var(--line);
}

.tab-button.is-active,
.tool-toggle.is-active,
.primary {
  color: #fff;
  border-color: var(--btn);
  background: var(--btn);
}

.secondary,
.primary-link {
  color: #fff;
  border-color: var(--line);
  background: var(--btn2);
}

.ghost-button,
.ghost-link,
.download {
  color: var(--text);
}

.dropzone {
  border-style: dashed;
  border-color: #4a4a4a;
  background: var(--panel2);
}

.dropzone-title {
  color: var(--text);
  font-size: 1rem;
}

.dropzone-subtitle,
.metric-label,
.metric-note,
.preview-note,
.summary-line,
.panel-note,
.choice-card small,
.field-card span,
.hero-chip span {
  color: var(--muted);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hub-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hub-head h2 {
  margin: 0;
  font-size: 20px;
}

.hub-card .panel-note {
  margin: 0;
}

.hub-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.hub-list li + li {
  margin-top: 6px;
}

.hub-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.canvas-frame {
  min-height: 420px;
  margin-top: 16px;
  background:
    linear-gradient(rgba(72, 72, 72, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 72, 72, 0.14) 1px, transparent 1px),
    #111;
  background-size: 26px 26px;
}

.choice-card,
.field-card {
  min-height: 0;
  background: var(--panel2);
}

.choice-card input:checked + span,
.choice-card input:checked + strong {
  color: var(--green);
}

.choice-card:has(input:checked) {
  border-color: #5a5a5a;
  box-shadow: none;
}

input[type="number"],
input[type="text"] {
  padding: 8px 10px;
  border-radius: 2px;
  border: 1px solid #444;
  background: var(--panel2);
  color: var(--text);
}

input[type="range"] {
  accent-color: var(--green);
}

.preview-card img {
  border-radius: 2px;
  border: 1px solid #3b3b3b;
  background: #111;
}

.advice-card ul,
.advice-card p {
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .hero {
    flex-direction: column;
  }

  .hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .page {
    padding: 0 10px 20px;
    margin-top: 14px;
  }

  .hero h1 {
    font-size: 20px;
  }
}

.network-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.network-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 2px;
  border: 1px solid #3b3b3b;
  background: #1f1f1f;
  color: #98a1a8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.network-link:hover {
  color: #d6dce1;
  filter: brightness(1.04);
}

.network-link.is-active {
  color: #e7efe7;
  background: #182218;
  border-color: #416241;
}

body {
  color: #dfe4e8;
}

.hero h1,
.panel-head h2,
.preview-card h3,
.advice-card h3,
.hub-head h2,
.results-head h2 {
  color: #e5e8eb;
  font-weight: 600;
}

.lead,
.panel-note,
.preview-note,
.summary-line,
.metric-note,
.dropzone-subtitle,
.field-card span,
.choice-card small,
.hero-chip span,
.hub-list {
  color: #a5adb5;
}

.tab-button,
.tool-toggle,
.ghost-button,
.download,
.primary,
.secondary,
.primary-link {
  color: #d7dce0;
  font-weight: 600;
  background: #303030;
}

.tab-button.is-active,
.tool-toggle.is-active,
.primary {
  color: #ebf4eb;
  border-color: #456545;
  background: #273427;
}

.secondary,
.primary-link {
  color: #d7dce0;
  border-color: #4a4a4a;
  background: #2c2c2c;
}


.site-footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
}

.site-footer__copy {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}


.page-head{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:18px;
}

.page-head h1{
  margin:0;
  font-size:42px;
  line-height:1.04;
  font-weight:600;
  letter-spacing:-.03em;
}

.page-head .lead{
  max-width:680px;
  margin:0;
  color:var(--muted);
}

.move-note{
  margin-bottom:18px;
  padding:12px 14px;
  border:1px solid #3b3b3b;
  border-radius:2px;
  background:#232323;
  color:var(--muted);
}

.move-note a{
  color:var(--text);
  text-decoration:underline;
  text-underline-offset:3px;
}

.back-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  min-height:40px;
  padding:0 14px;
  border:1px solid var(--line);
  border-radius:3px;
  background:#202020;
  color:var(--muted);
  font-weight:600;
}

.back-link:hover,
.back-link:visited{
  color:var(--muted);
  filter:brightness(1.05);
}

.hub-grid--minimal{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.hub-card--link{
  display:block;
}

.hub-card--link h2{
  margin:0 0 10px;
}

.hub-card--link p{
  margin:0;
  color:var(--muted);
}

@media (max-width: 820px){
  .hub-grid--minimal{
    grid-template-columns:1fr;
  }

  .page-head h1{
    font-size:34px;
  }
}
