:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #fafafa;
  --surface-strong: #f4f4f5;
  --section-soft: #fafafa;
  --text: #09090b;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --accent: #18181b;
  --accent-strong: #09090b;
  --accent-soft: #f4f4f5;
  --blue: #18181b;
  --teal: #08aaa5;
  --yellow: #f5ad18;
  --pink: #f25487;
  --green: #20b263;
  --success: #20b263;
  --success-soft: #e7f8ef;
  --warning: #e59a17;
  --warning-soft: #fff5df;
  --danger: #d6455d;
  --danger-soft: #fff0f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06);
  --chart-bg: #fbfcff;
}

.chart-viewport[data-theme="dark"] {
  --chart-bg: #151a2a;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.009em;
  background: var(--page);
}

button,
textarea,
select,
input {
  color: inherit;
  font: inherit;
}

button,
select,
.drop-zone {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
select:focus-visible,
.drop-zone:focus-within {
  outline: 3px solid color-mix(in srgb, var(--accent) 28%, transparent);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.lucide {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  background: var(--accent);
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: 78px;
  background: color-mix(in srgb, var(--page) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.section-inner,
.hero-inner {
  width: min(100%, 1600px);
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  gap: 28px;
  align-items: center;
  min-height: 78px;
  padding: 10px 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 auto;
  width: 52px;
  height: 32px;
  margin-right: 7px;
  object-fit: contain;
}

.brand-name {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.free-badge {
  margin-left: 12px;
  padding: 6px 9px;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--accent);
  border-radius: 6px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 38px;
}

.main-nav a,
.footer-links a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--accent-strong);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.open-editor-link,
.coffee-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 9999px;
}

.open-editor-link {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
}

.open-editor-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.coffee-link {
  color: #ffffff;
  background: #18181b;
  border: 1px solid #18181b;
  box-shadow: none;
}

.coffee-link:hover {
  color: #ffffff;
  background: #09090b;
}

.coffee-link--header {
  min-width: 154px;
}

.hero-shell {
  padding: 34px 0 46px;
  background: var(--page);
}

.hero-inner {
  padding: 0 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(430px, 520px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.hero-left {
  min-width: 0;
  padding-top: 2px;
}

.hero-copy {
  max-width: 520px;
  padding: 0 16px 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.hero-eyebrow::before {
  width: 7px;
  height: 7px;
  content: "";
  background: #fafafa;
  border-radius: 50%;
}

.hero-eyebrow span {
  margin: 0 2px;
  color: var(--line-strong);
}

.hero-copy h1 {
  max-width: 520px;
  font-family: inherit;
  font-size: clamp(2.8rem, 4vw, 4.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-copy h1 span {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #fafafa;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.hero-copy > p:last-child {
  max-width: 550px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.editor-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}

.editor-panel {
  scroll-margin-top: 94px;
  padding: 14px;
}

.editor-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 9999px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 500;
  background: transparent;
  border: 0;
  border-radius: 9999px;
}

.mode-tab .lucide {
  width: 16px;
  height: 16px;
}

.mode-tab.is-active {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  background: var(--surface-strong);
  border-color: var(--line-strong);
}

.input-panel {
  padding-top: 11px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.field-label-row label,
.settings-row label {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 500;
}

.field-label-row > span,
.field-help {
  color: var(--muted);
  font-size: 0.62rem;
}

textarea {
  display: block;
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.45;
  background: var(--surface-soft);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.code-input {
  min-height: 168px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.68rem;
}

.field-help {
  margin: 6px 0 0;
  line-height: 1.4;
}

.text-button {
  padding: 3px 0;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 500;
  background: transparent;
  border: 0;
}

.text-button:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.example-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.example-row > span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.example-chip {
  min-height: 27px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.example-chip:hover,
.example-chip.is-active {
  color: var(--text);
  background: var(--surface-strong);
  border-color: var(--line-strong);
}

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 18px;
  text-align: center;
  background: var(--surface-soft);
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background: var(--surface-strong);
  border-color: var(--line-strong);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
  color: var(--text);
}

.drop-zone strong {
  font-size: 0.8rem;
  font-weight: 500;
}

.drop-zone > span:not(.browse-label) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.browse-label {
  margin-top: 10px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.editor-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

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

.settings-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

select {
  width: 100%;
  min-width: 0;
  height: 37px;
  padding: 0 24px 0 8px;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 500;
  background-color: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.generate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 39px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 500;
  background: #18181b;
  border: 1px solid #18181b;
  border-radius: 16px;
  box-shadow: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.generate-button:hover:not(:disabled) {
  color: #ffffff;
  background: #09090b;
  box-shadow: none;
  transform: translateY(-1px);
}

.editor-feedback {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.editor-status {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 8px 9px;
  background: var(--success-soft);
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
  border-radius: 6px;
}

.editor-status.is-busy {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 32%, var(--line));
}

.editor-status.is-error {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
}

.status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 16%, transparent);
}

.status-dot.is-busy {
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent);
}

.status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.editor-status .status-dot {
  margin-top: 4px;
}

.editor-status strong {
  display: block;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-status p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.59rem;
  line-height: 1.35;
}

.normalizer-status,
.security-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.61rem;
  white-space: nowrap;
}

.security-note {
  margin: 0;
}

.normalizer-status .status-dot {
  width: 7px;
  height: 7px;
}

.security-note .lucide {
  width: 13px;
  height: 13px;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(500px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.preview-heading {
  min-width: 0;
}

.preview-heading h2 {
  max-width: 650px;
  font-size: 1.3rem;
  line-height: 1.15;
}

.preview-heading > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.63rem;
}

.preview-toolbar,
.export-group {
  display: flex;
  align-items: center;
}

.preview-toolbar {
  flex: 0 0 auto;
  gap: 6px;
}

.export-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.export-group button,
.icon-button {
  min-height: 38px;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 500;
  background: var(--surface);
  border: 0;
}

.export-group button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}

.export-group button + button {
  border-left: 1px solid var(--line);
}

.export-group button:hover,
.icon-button:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.chart-viewport {
  position: relative;
  min-width: 0;
  min-height: 500px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--chart-bg);
  scrollbar-color: var(--line-strong) transparent;
}

#sankeyChart {
  display: block;
  min-width: 820px;
  min-height: 500px;
  background: var(--chart-bg);
}

.sankey-link {
  fill: none;
  stroke-linecap: butt;
  transition: opacity 150ms ease;
}

.sankey-link.is-dimmed,
.sankey-node.is-dimmed {
  opacity: 0.12;
}

.sankey-link.is-highlighted {
  opacity: 0.78 !important;
}

.sankey-node {
  cursor: pointer;
  transition: opacity 150ms ease;
}

.sankey-node:focus {
  outline: none;
}

.node-card {
  stroke: none;
  stroke-width: 0;
  filter: drop-shadow(0 5px 7px rgba(24, 35, 66, 0.14));
}

.sankey-node:focus .node-card,
.sankey-node.is-highlighted .node-card {
  stroke: #091331;
  stroke-width: 2.5;
}

.node-label,
.node-value,
.node-change {
  fill: #ffffff;
  pointer-events: none;
  letter-spacing: 0;
}

.node-label {
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

.node-value {
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.96;
}

.node-change {
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  font-size: 8.5px;
  font-weight: 600;
  opacity: 0.82;
}

.tooltip {
  position: absolute;
  z-index: 8;
  max-width: 240px;
  padding: 9px 11px;
  color: #ffffff;
  font-size: 0.7rem;
  line-height: 1.45;
  background: rgba(13, 23, 56, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  box-shadow: 0 12px 26px rgba(5, 12, 34, 0.2);
  pointer-events: none;
}

.tooltip strong {
  display: block;
  margin-bottom: 2px;
}

.loading-overlay {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  font-size: 0.8rem;
  background: color-mix(in srgb, var(--chart-bg) 86%, transparent);
  backdrop-filter: blur(3px);
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.preview-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.metric-strip > div {
  min-width: 0;
  padding: 10px 13px;
}

.metric-strip > div + div {
  border-left: 1px solid var(--line);
}

.metric-strip span {
  display: block;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-strip small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 500;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 11px 14px 13px;
}

.insight-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 0.59rem;
  line-height: 1.42;
}

.insight-index {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
  font-size: 0.55rem;
  font-weight: 800;
  background: var(--accent-soft);
  border-radius: 50%;
}

.preview-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.preview-panel:fullscreen .chart-viewport {
  min-height: 0;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.benefit-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.benefit-icon,
.template-icon,
.support-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.benefit-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.benefit-icon--violet { color: #6847ee; background: #f0ebff; }
.benefit-icon--teal { color: #048a84; background: #e2f8f5; }
.benefit-icon--yellow { color: #c47c00; background: #fff3d8; }
.benefit-icon--pink { color: #d83b70; background: #ffedf3; }

.benefit-item h2 {
  font-size: 0.75rem;
  line-height: 1.2;
}

.benefit-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

.templates-section,
.how-section,
.support-section {
  scroll-margin-top: 78px;
}

.templates-section {
  padding: 82px 0 86px;
  background: var(--page);
  border-top: 1px solid var(--line);
}

.section-inner {
  padding: 0 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-heading h2,
.how-copy h2,
.support-inner h2 {
  font-size: 2.1rem;
  line-height: 1.05;
}

.section-heading p:not(.section-kicker),
.support-inner p:not(.section-kicker) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.section-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 500;
  text-decoration: none;
}

.section-heading > a:hover {
  text-decoration: underline;
}

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

.template-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 118px;
  padding: 17px 32px 17px 15px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.template-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-2px);
}

.template-icon {
  width: 40px;
  height: 40px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.template-icon--blue,
.template-icon--teal,
.template-icon--yellow,
.template-icon--pink,
.template-icon--green {
  color: var(--text);
  background: var(--surface-soft);
}

.template-card strong,
.template-card small {
  display: block;
}

.template-card strong {
  font-size: 0.75rem;
  font-weight: 500;
}

.template-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.template-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.how-section {
  padding: 96px 0 104px;
  color: var(--text);
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.how-inner {
  text-align: center;
}

.how-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.how-inner h2 {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
  font-size: clamp(1.9rem, 2.8vw, 2.8rem);
  line-height: 1.08;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin: 48px 0 38px;
  padding: 0;
  list-style: none;
}

.how-step {
  min-width: 0;
  padding: 24px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 0 28px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: none;
}

.how-step strong {
  display: block;
  font-size: 1rem;
  font-weight: 500;
}

.how-step p {
  max-width: 310px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.step-connector {
  display: none;
}

.step-connector .lucide {
  width: 44px;
  height: 44px;
  stroke-width: 1.4;
}

.how-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 500;
  text-decoration: none;
  background: #18181b;
  border: 1px solid #18181b;
  border-radius: 16px;
  box-shadow: none;
}

.how-cta:hover {
  color: #ffffff;
  background: #09090b;
}

.how-cta .lucide {
  width: 16px;
  height: 16px;
}

.support-section {
  padding: 42px 0;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.support-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.support-icon {
  width: 58px;
  height: 58px;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.coffee-link--large {
  min-height: 48px;
  padding: 0 20px;
  font-size: 0.82rem;
}

.site-footer {
  padding: 30px 0;
  background: var(--page);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
}

.brand--footer .brand-mark {
  width: 42px;
  height: 26px;
}

.brand--footer .brand-name {
  font-size: 1.08rem;
}

.footer-inner > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.68rem;
}

@media (max-width: 1320px) {
  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 22px;
    padding-left: 22px;
  }

  .header-inner {
    grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
    gap: 18px;
  }

  .main-nav {
    gap: 24px;
  }

  .hero-grid {
    grid-template-columns: minmax(350px, 400px) minmax(0, 1fr);
    gap: 20px;
  }

  .hero-copy h1 {
    font-size: 3.15rem;
  }

  .editor-controls {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1060px) {
  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-copy h1 {
    max-width: 700px;
  }

  .editor-controls {
    grid-template-columns: minmax(0, 1fr) minmax(160px, 190px);
  }

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

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

@media (max-width: 720px) {
  .site-header,
  .header-inner {
    min-height: 66px;
  }

  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 14px;
    padding-left: 14px;
  }

  .header-inner {
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .brand-mark {
    width: 44px;
    height: 27px;
    margin-right: 4px;
  }

  .brand-name {
    font-size: 1.03rem;
  }

  .free-badge,
  .coffee-link--header span,
  .open-editor-link span {
    display: none;
  }

  .coffee-link--header,
  .open-editor-link {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .hero-shell {
    padding-top: 24px;
    background-position: center;
    background-size: 100% 100%;
  }

  .hero-copy {
    padding: 0 4px 18px;
  }

  .hero-eyebrow {
    font-size: 0.74rem;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
    line-height: 1;
  }

  .hero-copy > p:last-child {
    font-size: 0.9rem;
  }

  .editor-panel {
    padding: 12px;
  }

  .editor-topline {
    align-items: flex-start;
  }

  .editor-topline > .text-button {
    display: none;
  }

  .mode-tabs {
    width: 100%;
  }

  .mode-tab {
    flex: 1 1 0;
    min-height: 42px;
    padding: 0 7px;
  }

  textarea {
    min-height: 210px;
  }

  .editor-controls {
    grid-template-columns: 1fr;
  }

  .settings-row {
    grid-template-columns: 1fr;
  }

  .settings-row label {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
  }

  select,
  .generate-button {
    min-height: 44px;
  }

  .editor-feedback {
    grid-template-columns: 1fr;
  }

  .normalizer-status,
  .security-note {
    justify-content: center;
  }

  .preview-panel {
    grid-template-rows: auto minmax(520px, 1fr) auto;
  }

  .preview-header {
    flex-direction: column;
    padding: 15px;
  }

  .preview-toolbar {
    width: 100%;
  }

  .export-group {
    flex: 1 1 auto;
  }

  .export-group button {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .icon-button {
    width: 44px;
    min-height: 44px;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-strip > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .metric-strip > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .insight-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .chart-viewport,
  #sankeyChart {
    min-height: 520px;
  }

  .benefit-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .benefit-grid {
    gap: 9px;
    margin-top: 14px;
  }

  .templates-section,
  .how-section {
    padding: 66px 0;
  }

  .how-steps {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 40px 0 32px;
  }

  .step-connector {
    display: none;
  }

  .section-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .section-heading > a {
    display: none;
  }

  .section-heading h2,
  .how-inner h2,
  .support-inner h2 {
    font-size: 1.8rem;
  }

  .template-card {
    min-height: 94px;
  }

  .support-section {
    padding: 36px 0;
  }

  .support-inner {
    grid-template-columns: auto 1fr;
  }

  .coffee-link--large {
    grid-column: 1 / -1;
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 2.25rem;
  }

  .mode-tab {
    gap: 4px;
    font-size: 0.67rem;
  }

  .mode-tab .lucide {
    width: 15px;
    height: 15px;
  }

  .example-row > span {
    flex-basis: 100%;
  }

  .preview-heading h2 {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* SaaS kit inspired landing refresh */
:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f6f7;
  --surface-strong: #ededee;
  --section-soft: #fafafa;
  --text: #0a0a0b;
  --muted: #68686d;
  --line: #e4e4e7;
  --line-strong: #c9c9ce;
  --accent: #18181b;
  --accent-strong: #050506;
  --accent-soft: #f4f4f5;
  --chart-bg: #fbfcff;
  --shadow: 0 18px 50px rgba(10, 10, 11, 0.07);
  --shadow-soft: 0 10px 30px rgba(10, 10, 11, 0.06);
}

html,
body,
button,
textarea,
select,
input,
h1,
h2,
h3,
p {
  letter-spacing: 0;
}

body {
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 44%, #fafafa 100%);
}

.site-header {
  min-height: 73px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner,
.section-inner,
.hero-inner {
  width: min(100%, 1440px);
}

.header-inner {
  grid-template-columns: auto 1fr auto;
  min-height: 73px;
  padding: 12px 28px;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
}

.main-nav {
  gap: 8px;
}

.main-nav a,
.footer-links a {
  min-height: 40px;
  padding: 10px 14px;
  color: var(--muted);
  border-radius: 8px;
}

.main-nav a:hover,
.footer-links a:hover {
  color: var(--text);
  background: var(--surface-soft);
  text-decoration: none;
}

.coffee-link,
.primary-link,
.secondary-link,
.generate-button,
.how-cta {
  border-radius: 8px;
}

.coffee-link,
.primary-link,
.generate-button,
.how-cta {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.coffee-link:hover,
.primary-link:hover,
.generate-button:hover:not(:disabled),
.how-cta:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
}

.secondary-link:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.landing-page {
  overflow: hidden;
}

.hero-shell {
  padding: 18px 0 20px;
  background: var(--page);
}

.hero-inner,
.section-inner {
  padding-right: 28px;
  padding-left: 28px;
}

.hero-grid {
  grid-template-columns: minmax(520px, 0.82fr) minmax(0, 1.18fr);
  gap: 32px;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 0;
}

.hero-copy {
  max-width: 620px;
  padding: 0;
}

.hero-product-name {
  display: inline-block;
  max-width: none;
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(90deg, rgba(24, 24, 27, 0.16), #18181b 48%, rgba(24, 24, 27, 0.18));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.35rem, 3.8vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
}

.hero-title em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 5px;
  text-underline-offset: 7px;
}

.hero-description {
  max-width: 600px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-link {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.editor-panel,
.preview-panel,
.template-card,
.how-feature,
.how-showcase,
.showcase-window,
.showcase-map,
.showcase-export,
.support-section {
  border-radius: 8px;
}

.editor-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.editor-panel {
  padding: 12px;
}

.mode-tabs {
  width: 100%;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mode-tab {
  flex: 1 1 0;
  min-height: 38px;
  border-radius: 6px;
}

.mode-tab.is-active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

textarea,
select,
.drop-zone {
  border-radius: 8px;
}

textarea {
  min-height: 94px;
  background: var(--surface-soft);
}

.example-chip,
.export-group,
.icon-button {
  border-radius: 8px;
}

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

.generate-button {
  min-height: 43px;
}

.editor-status {
  display: none;
  border-radius: 8px;
  padding: 7px 9px;
}

.editor-status p {
  display: none;
}

.preview-panel {
  grid-template-rows: auto minmax(500px, 1fr) auto;
}

.preview-header {
  align-items: center;
  padding: 18px;
}

.preview-heading h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.chart-viewport {
  min-height: 500px;
}

#sankeyChart {
  min-height: 500px;
}

.templates-section,
.how-section,
.support-section {
  scroll-margin-top: 73px;
}

.templates-section {
  padding: 86px 0 78px;
  background: var(--page);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  font-weight: 800;
}

.section-heading p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

.template-card {
  min-height: 148px;
  padding: 20px 42px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.template-card:hover {
  background: #ffffff;
  border-color: var(--text);
}

.template-icon {
  width: 42px;
  height: 42px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.template-card strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.template-card small {
  font-size: 0.72rem;
  line-height: 1.5;
}

.how-section {
  padding: 94px 0 104px;
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.saas-feature-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 58px 72px;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0;
}

.how-feature {
  display: flex;
  grid-column: 1;
  align-items: flex-start;
  gap: 18px;
  min-height: 230px;
  padding: 0;
}

.how-feature:nth-child(4n+3) {
  grid-column: 2;
}

.how-feature > .lucide {
  width: 40px;
  height: 40px;
  color: var(--text);
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
  stroke-width: 1.8;
}

.how-feature dt {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
}

.how-feature dd {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.72;
  text-align: justify;
  hyphens: auto;
}

.how-showcase {
  display: grid;
  grid-column: 2;
  min-height: 230px;
  place-items: center;
}

.how-showcase:nth-child(4n) {
  grid-column: 1;
}

.showcase-window,
.showcase-map,
.showcase-export {
  width: min(100%, 420px);
  min-height: 230px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.showcase-window {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.showcase-bar {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}

.showcase-bar span {
  width: 9px;
  height: 9px;
  background: var(--line-strong);
  border-radius: 999px;
}

.showcase-window p {
  margin: 0;
  padding: 12px 14px;
  color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.showcase-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.showcase-map span,
.showcase-export button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.showcase-map .lucide {
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.showcase-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.showcase-export button {
  color: var(--text);
}

.showcase-export button:first-child {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.support-section {
  margin: 0;
  padding: 64px 0;
  background: var(--page);
  border-top: 0;
}

.support-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.support-inner h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  font-weight: 800;
}

.support-inner p:not(.section-kicker) {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  grid-template-columns: auto 1fr;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

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

  .hero-copy {
    max-width: 780px;
    text-align: center;
    justify-self: center;
  }

  .hero-actions {
    justify-content: center;
  }

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

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

@media (max-width: 780px) {
  .site-header,
  .header-inner {
    min-height: 66px;
  }

  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-shell {
    padding: 42px 0 58px;
  }

  .hero-title {
    font-size: 2.65rem;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .settings-row,
  .template-grid,
  .saas-feature-grid {
    grid-template-columns: 1fr;
  }

  .how-feature,
  .how-feature:nth-child(4n+3),
  .how-showcase,
  .how-showcase:nth-child(4n) {
    grid-column: 1;
  }

  .how-feature {
    min-height: auto;
  }

  .how-showcase {
    min-height: 190px;
  }

  .saas-feature-grid {
    gap: 28px;
  }

  .showcase-window,
  .showcase-map,
  .showcase-export {
    min-height: 190px;
  }

  .showcase-map {
    grid-template-columns: 1fr;
  }

  .showcase-map .lucide {
    rotate: 90deg;
    justify-self: center;
  }

  .support-inner,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .coffee-link--large,
  .footer-links {
    justify-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .how-feature {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

/* TaxPal demo-inspired correction */
:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef2f7;
  --section-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e5e7eb;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #dbeafe;
  --night: #0f172a;
  --chart-bg: #fbfcff;
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.16);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.1);
}

body {
  color: var(--text);
  background: #ffffff;
}

.site-header {
  position: relative;
  min-height: 76px;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.header-inner,
.hero-inner,
.section-inner {
  width: min(100%, 1216px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 76px;
  padding: 20px 32px 12px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  margin-right: 8px;
}

.brand-name {
  color: #2563eb;
  font-size: 0.9rem;
  font-weight: 800;
}

.main-nav {
  gap: 18px;
}

.main-nav a,
.footer-links a,
.signin-link {
  min-height: auto;
  padding: 6px 8px;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.main-nav a:hover,
.footer-links a:hover,
.signin-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 17px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  background: #2563eb;
  border-radius: 9999px;
}

.header-cta:hover {
  background: #1d4ed8;
}

.hero-shell {
  padding: 96px 0 66px;
  background: #ffffff;
}

.hero-inner,
.section-inner {
  padding-right: 32px;
  padding-left: 32px;
}

.hero-copy {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

.hero-title {
  max-width: 920px;
  margin: 0 auto;
  color: #0f172a;
  font-size: clamp(3rem, 7vw, 5.35rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-title span {
  color: #2563eb;
}

.hero-copy .hero-title span {
  color: #2563eb;
  text-decoration: none;
}

.hero-description {
  max-width: 620px;
  margin: 24px auto 0;
  color: #475569;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions {
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.primary-link,
.secondary-link,
.coffee-link,
.generate-button,
.header-cta {
  border-radius: 9999px;
}

.primary-link {
  min-height: 44px;
  padding: 0 20px;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
  background: #0f172a;
  border-color: #0f172a;
}

.primary-link:hover {
  background: #334155;
  border-color: #334155;
}

.secondary-link {
  min-height: 44px;
  padding: 0 20px;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.02);
}

.secondary-link:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #ffffff;
}

.secondary-link .lucide {
  width: 17px;
  height: 17px;
  fill: #2563eb;
  color: #2563eb;
}

.trust-strip {
  margin: 92px auto 0;
  text-align: center;
}

.trust-strip p {
  margin: 0 0 22px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.logo-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.logo-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.92rem;
  font-weight: 800;
}

.logo-row .lucide {
  width: 22px;
  height: 22px;
  color: #94a3b8;
}

.features-product {
  padding: 92px 0 116px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 100%, rgba(168, 85, 247, 0.62) 0, transparent 34%),
    linear-gradient(180deg, #2563eb 0%, #2563eb 64%, #3b82f6 100%);
  overflow: hidden;
}

.feature-band-heading {
  max-width: 780px;
  margin: 0 auto 64px;
  text-align: center;
}

.feature-band-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.feature-band-heading p {
  max-width: 610px;
  margin: 18px auto 0;
  color: #bfdbfe;
  font-size: 0.98rem;
  line-height: 1.65;
}

.product-stage {
  display: grid;
  grid-template-columns: minmax(250px, 350px) minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.feature-tabs {
  display: grid;
  gap: 20px;
}

.feature-tab {
  padding: 0 0 20px;
  color: #bfdbfe;
  border-bottom: 1px solid rgba(191, 219, 254, 0.26);
}

.feature-tab h3 {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.95rem;
  font-weight: 800;
}

.feature-tab p {
  margin: 8px 0 0;
  font-size: 0.86rem;
  line-height: 1.62;
}

.feature-tab.is-active {
  color: #ffffff;
}

.feature-tab.is-active h3 {
  color: #ffffff;
}

.generator-window {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 0.58fr);
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.editor-panel,
.preview-panel {
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.editor-panel {
  padding: 18px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.mode-tabs {
  background: #ffffff;
  border-color: #e2e8f0;
  border-radius: 10px;
}

.mode-tab {
  color: #64748b;
  border-radius: 8px;
}

.mode-tab.is-active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

textarea,
select,
.drop-zone {
  background: #ffffff;
  border-color: #e2e8f0;
  border-radius: 8px;
}

textarea {
  min-height: 178px;
  color: #0f172a;
}

.example-chip {
  color: #475569;
  background: #ffffff;
  border-color: #e2e8f0;
  border-radius: 9999px;
}

.example-chip:hover,
.example-chip.is-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.generate-button {
  min-height: 42px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  background: #2563eb;
  border-color: #2563eb;
}

.generate-button:hover:not(:disabled) {
  background: #1d4ed8;
}

.editor-status {
  display: grid;
  background: #ffffff;
}

.editor-status p {
  display: block;
}

.preview-panel {
  min-width: 0;
  background: #ffffff;
}

.preview-header {
  min-height: 72px;
  padding: 16px 18px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.preview-heading h2 {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.preview-heading > p {
  color: #64748b;
}

.chart-viewport,
#sankeyChart {
  min-height: 468px;
}

.preview-footer {
  background: #ffffff;
}

.how-section {
  padding: 108px 0 126px;
  background: #ffffff;
  border: 0;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 70px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.45rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 560px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.65;
}

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

.how-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ffffff;
  background: #2563eb;
  border-radius: 8px;
}

.how-card span .lucide {
  width: 18px;
  height: 18px;
}

.how-card h3 {
  margin: 22px 0 8px;
  color: #2563eb;
  font-size: 0.96rem;
  font-weight: 800;
}

.how-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.7;
}

.workflow-preview {
  display: grid;
  grid-template-columns: 1fr 0.38fr;
  gap: 36px;
  margin: 72px auto 0;
  max-width: 1040px;
  padding: 48px;
  background: #e8eef6;
  border-radius: 22px;
}

.workflow-main,
.workflow-side {
  min-height: 260px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.workflow-side {
  opacity: 0.72;
}

.templates-section {
  padding: 104px 0;
  background: #f8fafc;
  border: 0;
}

.template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.template-card {
  min-height: 172px;
  padding: 24px 44px 24px 24px;
  background: #ffffff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.template-card:hover {
  background: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
}

.template-icon {
  color: #2563eb;
  background: #eff6ff;
  border-color: #dbeafe;
}

.template-card strong {
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
}

.template-card small {
  color: #64748b;
  font-size: 0.74rem;
}

.support-section {
  padding: 96px 0;
  color: #ffffff;
  background: #2563eb;
  border-radius: 0;
}

.support-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
}

.support-inner h2 {
  color: #ffffff;
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.support-inner p:not(.section-kicker) {
  max-width: 540px;
  margin: 12px auto 0;
  color: #bfdbfe;
}

.coffee-link--large {
  min-height: 38px;
  padding: 0 18px;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  background: #ffffff;
  border-color: #ffffff;
}

.coffee-link--large:hover {
  color: #0f172a;
  background: #eff6ff;
}

.site-footer {
  padding: 68px 0 38px;
  background: #ffffff;
  border: 0;
}

.footer-inner {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 24px;
}

.footer-links {
  justify-content: center;
  gap: 18px;
}

@media (max-width: 1100px) {
  .product-stage,
  .generator-window {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

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

  .feature-tab {
    border-bottom: 0;
  }

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

@media (max-width: 760px) {
  .site-header,
  .header-inner {
    min-height: 60px;
  }

  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 20px;
    padding-left: 20px;
  }

  .header-inner {
    grid-template-columns: auto auto;
    padding-top: 14px;
  }

  .main-nav,
  .signin-link {
    display: none;
  }

  .header-cta {
    width: 38px;
    min-height: 38px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .header-cta::before {
    content: "";
    width: 15px;
    height: 15px;
    border: 2px solid #ffffff;
    border-radius: 50%;
  }

  .hero-shell {
    padding: 58px 0 48px;
  }

  .hero-title {
    font-size: 2.55rem;
    line-height: 1.02;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }

  .trust-strip {
    margin-top: 52px;
  }

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

  .features-product {
    padding: 64px 0 76px;
  }

  .feature-tabs {
    grid-template-columns: 1fr;
  }

  .feature-tab {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(191, 219, 254, 0.26);
  }

  .generator-window {
    border-radius: 12px;
  }

  .settings-row,
  .how-card-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 132px;
  }

  .preview-header {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-viewport,
  #sankeyChart {
    min-height: 500px;
  }

  .how-section,
  .templates-section {
    padding: 76px 0;
  }

  .how-card-grid {
    gap: 42px;
  }

  .workflow-preview {
    grid-template-columns: 1fr;
    padding: 18px;
    gap: 18px;
  }

  .workflow-main,
  .workflow-side {
    min-height: 220px;
  }

  .support-section {
    padding: 76px 0;
  }
}

/* Online tool layout reset */
:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef2f7;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --chart-bg: #fbfcff;
  --shadow: 0 28px 70px rgba(15, 23, 42, 0.11);
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.site-header {
  position: sticky;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner,
.hero-inner,
.section-inner {
  width: min(100%, 1480px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 14px 34px;
}

.brand-mark {
  width: 42px;
  height: 28px;
  margin-right: 8px;
}

.brand-name {
  color: #0f172a;
  font-size: 0.96rem;
  font-weight: 800;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.main-nav a,
.signin-link {
  min-height: 38px;
  padding: 9px 12px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
}

.main-nav a:hover,
.signin-link:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 12px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  background: #2563eb;
  border-radius: 9999px;
}

.header-cta:hover {
  background: #1d4ed8;
}

.hero-shell {
  padding: 24px 0 48px;
  background: transparent;
}

.hero-inner,
.section-inner {
  padding-right: 34px;
  padding-left: 34px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(420px, 520px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.hero-copy {
  max-width: 540px;
  margin: 0;
  padding: 20px 0 0;
  text-align: left;
}

.hero-kicker {
  display: inline-flex;
  margin: 0 0 14px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-title {
  max-width: 540px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(3rem, 5vw, 4.8rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-copy .hero-title span {
  color: #2563eb;
  text-decoration: none;
}

.hero-description {
  max-width: 520px;
  margin: 20px 0 0;
  color: #475569;
  font-size: 1rem;
  line-height: 1.65;
}

.editor-panel,
.preview-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.editor-panel {
  padding: 15px;
}

.mode-tabs {
  width: 100%;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.mode-tab {
  flex: 1 1 0;
  color: #64748b;
  border-radius: 10px;
}

.mode-tab.is-active {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

textarea,
select,
.drop-zone {
  color: #0f172a;
  background: #ffffff;
  border-color: #e2e8f0;
  border-radius: 10px;
}

textarea {
  min-height: 178px;
}

.example-chip,
.export-group,
.icon-button {
  border-radius: 9999px;
}

.example-chip {
  color: #475569;
  background: #ffffff;
  border-color: #e2e8f0;
}

.example-chip:hover,
.example-chip.is-active {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

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

.generate-button {
  min-height: 43px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 9999px;
}

.generate-button:hover:not(:disabled) {
  background: #1d4ed8;
}

.editor-status {
  display: grid;
  background: #ffffff;
  border-radius: 10px;
}

.editor-status p {
  display: block;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(560px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-header {
  flex-direction: row;
  align-items: center;
  min-height: 74px;
  padding: 17px 18px;
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

.preview-heading h2 {
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 800;
}

.preview-heading > p {
  color: #64748b;
}

.chart-viewport,
#sankeyChart {
  min-height: 560px;
}

.preview-footer {
  background: #ffffff;
}

.how-section {
  padding: 94px 0 108px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading p {
  max-width: 540px;
  margin: 14px auto 0;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.65;
}

.how-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  max-width: 1040px;
  margin: 0 auto;
}

.how-card {
  min-width: 0;
}

.how-card span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: #2563eb;
  border-radius: 10px;
}

.how-card span .lucide {
  width: 18px;
  height: 18px;
}

.how-card h3 {
  margin: 22px 0 8px;
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 800;
}

.how-card p {
  margin: 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.7;
}

.templates-section,
.features-product,
.support-section,
.site-footer,
.trust-strip,
.product-stage,
.feature-band-heading,
.workflow-preview {
  display: none;
}

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

  .hero-copy {
    max-width: 760px;
    text-align: center;
    margin: 0 auto;
  }

  .hero-title,
  .hero-description {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
  }

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

@media (max-width: 760px) {
  .site-header,
  .header-inner {
    min-height: 62px;
  }

  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .header-inner {
    grid-template-columns: auto auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .main-nav,
  .signin-link {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 15px;
    width: auto;
    overflow: visible;
    font-size: 0.8rem;
  }

  .header-cta::before {
    content: none;
  }

  .hero-shell {
    padding: 26px 0 44px;
  }

  .hero-copy {
    padding-top: 4px;
  }

  .hero-title {
    font-size: 2.72rem;
    line-height: 1.02;
  }

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

  .settings-row,
  .how-card-grid {
    grid-template-columns: 1fr;
  }

  .settings-row label {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: center;
  }

  textarea {
    min-height: 140px;
  }

  .preview-header {
    flex-direction: column;
    align-items: stretch;
  }

  .preview-panel {
    grid-template-rows: auto minmax(520px, 1fr) auto;
  }

  .chart-viewport,
  #sankeyChart {
    min-height: 520px;
  }

  .how-section {
    padding: 72px 0 82px;
  }

  .how-card-grid {
    gap: 40px;
  }
}

/* Requested online-tool polish */
.header-inner {
  grid-template-columns: auto 1fr;
}

.header-actions {
  justify-self: end;
}

.main-nav,
.signin-link {
  display: none;
}

.header-cta {
  min-width: 150px;
  color: #0d0c22;
  background: #ffdd00;
  box-shadow: 0 10px 24px rgba(255, 221, 0, 0.28);
}

.header-cta:hover {
  color: #0d0c22;
  background: #ffd000;
}

.hero-shell {
  padding-top: 0;
}

.hero-copy {
  padding-top: 0;
}

.hero-grid {
  grid-template-columns: minmax(420px, 520px) minmax(0, 702px);
  justify-content: center;
}

.preview-panel {
  width: 100%;
  max-width: 702px;
  justify-self: end;
  margin-top: 22px;
  grid-template-rows: auto minmax(454px, 1fr) auto;
}

.chart-viewport,
#sankeyChart {
  min-height: 454px;
}

.how-section {
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 110%, rgba(125, 92, 255, 0.52) 0, transparent 35%),
    linear-gradient(180deg, #2563eb 0%, #2563eb 58%, #2f6df3 100%);
  border-top: 0;
}

.how-section .section-heading h2,
.how-card h3 {
  color: #ffffff;
}

.how-section .section-heading p,
.how-card p {
  color: rgba(255, 255, 255, 0.82);
}

.how-card span {
  display: none;
}

.how-card {
  padding: 0;
}

.how-illustration {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 138px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
}

.how-illustration svg {
  width: min(78%, 190px);
  height: auto;
  overflow: visible;
}

.ill-bg {
  fill: rgba(255, 255, 255, 0.18);
}

.ill-card {
  fill: rgba(255, 255, 255, 0.92);
}

.ill-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.ill-accent {
  fill: none;
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.canvas-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
}

.theme-toggle:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.canvas-select {
  display: grid;
  gap: 4px;
  min-width: 104px;
}

.canvas-select span {
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.canvas-select select {
  width: 100%;
  height: 34px;
  min-height: 34px;
  padding: 0 26px 0 10px;
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 800;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
}

.preview-toolbar {
  gap: 10px;
}

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

  .preview-panel {
    max-width: none;
    justify-self: stretch;
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .header-cta {
    min-width: 126px;
  }

  .hero-shell {
    padding-top: 14px;
  }

  .preview-panel {
    grid-template-rows: auto minmax(421px, 1fr) auto;
  }

  .chart-viewport,
  #sankeyChart {
    min-height: 421px;
  }

  .preview-toolbar {
    flex-wrap: wrap;
  }

  .canvas-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .canvas-select {
    flex: 1 1 118px;
  }
}

/* Current landing-page trim */
.site-header {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.header-inner,
.hero-inner,
.section-inner {
  width: min(100%, 100vw);
}

.header-inner {
  padding-right: 12px;
  padding-left: 12px;
}

.hero-inner,
.section-inner {
  padding-right: 12px;
  padding-left: 12px;
}

.hero-shell {
  padding-bottom: 30px;
}

.hero-grid {
  grid-template-columns: minmax(410px, 500px) minmax(0, 807px);
  gap: 18px;
}

.preview-panel {
  max-width: 807px;
}

#sankeyChart {
  min-width: 100%;
}

.how-section {
  display: none;
}

.bmc-button {
  gap: 10px;
  min-width: 196px;
  min-height: 51px;
  padding: 7px 14px 7px 10px;
  color: #ffffff;
  font-family: "Cookie", "Comic Sans MS", "Segoe Print", cursive;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 35px;
  letter-spacing: 0.02em;
  background: #ff813f;
  border: 1px solid transparent;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(190, 190, 190, 0.5);
}

.bmc-button:hover,
.bmc-button:active,
.bmc-button:focus {
  color: #ffffff;
  background: #ff813f;
  opacity: 0.86;
  box-shadow: 0 1px 2px 2px rgba(190, 190, 190, 0.5);
}

.bmc-button-icon {
  display: block;
  width: 35px;
  height: 35px;
  border: 0;
  box-shadow: none;
}

@media (max-width: 1120px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .preview-panel {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .hero-inner,
  .section-inner {
    padding-right: 10px;
    padding-left: 10px;
  }

  .bmc-button {
    min-width: 52px;
    width: 52px;
    padding: 7px 8px;
  }

  .bmc-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* shadcn-inspired component pass */
:root {
  --sh-background: #ffffff;
  --sh-foreground: #09090b;
  --sh-card: #ffffff;
  --sh-muted: #f4f4f5;
  --sh-muted-foreground: #71717a;
  --sh-border: #e4e4e7;
  --sh-input: #e4e4e7;
  --sh-primary: #18181b;
  --sh-primary-foreground: #fafafa;
  --sh-ring: #18181b;
  --sh-radius: 8px;
}

.site-header {
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}

.header-inner {
  padding-right: 34px;
  padding-left: 34px;
}

.hero-title span,
.hero-copy .hero-title span {
  color: #2563eb;
}

.editor-panel,
.preview-panel {
  background: var(--sh-card);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  box-shadow: 0 18px 48px rgba(9, 9, 11, 0.08);
}

.mode-tabs {
  gap: 2px;
  padding: 4px;
  background: var(--sh-muted);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
}

.mode-tab,
.example-chip,
.generate-button,
.theme-toggle,
.export-group button,
.icon-button,
.browse-label {
  min-height: 40px;
  border-radius: calc(var(--sh-radius) - 2px);
}

.mode-tab {
  color: var(--sh-muted-foreground);
  font-size: 0.78rem;
  font-weight: 500;
  border: 0;
}

.mode-tab.is-active {
  color: var(--sh-foreground);
  background: var(--sh-background);
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(9, 9, 11, 0.08);
}

textarea,
select,
.drop-zone {
  background: var(--sh-background);
  border-color: var(--sh-input);
  border-radius: calc(var(--sh-radius) - 2px);
}

textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--sh-ring) 24%, var(--sh-input));
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.generate-button {
  color: var(--sh-primary-foreground);
  background: var(--sh-primary);
  border-color: var(--sh-primary);
}

.generate-button:hover:not(:disabled) {
  background: #27272a;
  border-color: #27272a;
}

.preview-header {
  align-items: center;
  min-height: 72px;
}

.preview-toolbar,
.canvas-controls,
.export-group {
  align-items: center;
}

.preview-toolbar {
  gap: 8px;
}

.canvas-controls {
  gap: 8px;
}

.canvas-select {
  display: block;
  min-width: 116px;
}

.canvas-select select {
  width: 116px;
  height: 40px;
  min-height: 40px;
  padding: 0 30px 0 12px;
  color: var(--sh-foreground);
  font-size: 0.74rem;
  font-weight: 500;
  background-color: var(--sh-background);
  border: 1px solid var(--sh-input);
  border-radius: calc(var(--sh-radius) - 2px);
}

.theme-toggle,
.icon-button {
  width: 40px;
  height: 40px;
  color: var(--sh-foreground);
  background: var(--sh-background);
  border: 1px solid var(--sh-input);
}

.theme-toggle:hover,
.icon-button:hover,
.export-group button:hover {
  color: var(--sh-foreground);
  background: var(--sh-muted);
}

.export-group {
  height: 40px;
  border-color: var(--sh-input);
  border-radius: calc(var(--sh-radius) - 2px);
}

.export-group button {
  height: 40px;
  min-width: 52px;
  padding: 0 12px;
  font-size: 0.74rem;
  font-weight: 500;
  background: var(--sh-background);
}

.bmc-button {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  line-height: 0;
  background: transparent;
  border: 1px solid rgba(9, 9, 11, 0.14);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(9, 9, 11, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.bmc-button:hover,
.bmc-button:active,
.bmc-button:focus {
  background: transparent;
  box-shadow: 0 7px 16px rgba(9, 9, 11, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  opacity: 0.96;
  transform: translateY(-1px);
}

.bmc-button-image {
  display: block;
  width: 178px;
  height: auto;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.legal-footer {
  display: block;
  padding: 20px 12px 24px;
  color: var(--sh-muted-foreground);
  background: #ffffff;
  border-top: 1px solid var(--sh-border);
}

.legal-footer .footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: 18px;
  align-items: start;
  width: min(100%, 1325px);
  margin: 0 auto;
  padding: 0;
}

.legal-footer p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .preview-header {
    align-items: flex-start;
  }

  .preview-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .header-inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .bmc-button {
    width: auto;
    min-width: 0;
  }

  .bmc-button-image {
    width: 132px;
  }

  .canvas-controls {
    width: 100%;
  }

  .canvas-select {
    flex: 1 1 116px;
    min-width: 0;
  }

  .canvas-select select {
    width: 100%;
  }

  .legal-footer .footer-inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Final requested corrections */
.site-header {
  position: static;
}

.brand-name {
  font-family: "Nothing You Could Do", cursive;
  font-size: 1.62rem;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-kicker {
  display: none;
}

.hero-title span,
.hero-copy .hero-title span {
  color: #2563eb;
}

.mode-tab.is-active {
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: none;
}

.mode-tab:hover {
  color: #2563eb;
  background: #eff6ff;
}

.generate-button {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}

.generate-button:hover:not(:disabled) {
  color: #ffffff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}

@media (max-width: 760px) {
  .brand-name {
    font-size: 1.28rem;
  }
}
