:root {
  color-scheme: dark;
  --bg: #06080f;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-muted: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f7ff;
  --text-soft: #c2c7dd;
  --text-muted: #8a90ab;
  --danger: #ff647c;
  --success: #17d28b;
  --accent: #00e87a;
  --accent-ink: #04110b;
  --accent-r: 0;
  --accent-g: 232;
  --accent-b: 122;
  --accent-gradient: #00e87a;
  --shadow: 0 18px 56px rgba(0, 0, 0, 0.32);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(84, 110, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #06080f 0%, #080b15 50%, #04060b 100%);
  color: var(--text);
  font-family: "Syne", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 90px 90px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 88%);
}

img {
  max-width: 100%;
}

button,
input,
textarea,
a {
  font: inherit;
}

input,
textarea {
  appearance: none;
  -webkit-appearance: none;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.95);
  outline-offset: 2px;
}

.progress-shell {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.85));
  transition: width 0.25s ease;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 68px;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), transparent 32%, transparent 68%, rgba(255, 255, 255, 0.03));
  opacity: 0.45;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-head--tight {
  margin-bottom: 20px;
}

.panel-head > .section-copy {
  max-width: 34ch;
}

.section-kicker,
.eyebrow,
.field-label,
.draft-status {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-kicker {
  margin-bottom: 10px;
}

.panel h2,
.hero h1 {
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.panel h2 {
  font-size: clamp(1.35rem, 1.4vw, 1.75rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  padding: 24px 26px;
  margin-bottom: 20px;
  align-items: start;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--accent-gradient);
  color: var(--accent-ink);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.45);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-name {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.hero h1 {
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  max-width: 12ch;
}

.lede,
.section-copy,
.hero-note p,
.preview-copy,
.preview-callout-copy,
.preview-footer-copy,
.preview-toolbar-copy {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.62;
  color: var(--text-soft);
}

.helper-copy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.section-caption {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.eyebrow {
  margin-bottom: 10px;
}

.lede {
  margin-top: 12px;
  max-width: 50ch;
}

.hero-actions,
.output-actions,
.custom-tech-entry,
.section-head,
.project-row-head,
.project-row-actions,
.preview-badge-row,
.preview-badge-row--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
.link-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.button:hover,
.link-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent-gradient);
  color: var(--accent-ink);
  font-weight: 800;
  letter-spacing: 0.01em;
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.34);
  box-shadow:
    0 16px 34px rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button--ghost,
.link-button,
.icon-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.button--danger,
.icon-button--danger {
  color: #ffd9df;
  border-color: rgba(255, 100, 124, 0.26);
  background: rgba(255, 100, 124, 0.08);
}

.button--small {
  padding: 10px 15px;
}

.button--cta {
  min-height: 48px;
  padding-inline: 22px;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.icon-button {
  min-width: 36px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-point {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-family: "Space Mono", monospace;
  font-size: 0.74rem;
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.hero-actions-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: calc(var(--radius-md) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.18), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.hero-side-label {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.92);
}

.hero-actions-card .hero-actions {
  margin-top: 0;
}

.hero-side-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--text-soft);
}

.hero-notes {
  display: grid;
  gap: 10px;
}

.hero-note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.hero-note p {
  font-size: 0.88rem;
  line-height: 1.52;
}

.hero-note-label {
  display: block;
  margin-bottom: 6px;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.92);
}

.preset-strip,
.editor > .panel,
.preview-panel {
  padding: 28px;
}

.preset-strip {
  margin-bottom: 16px;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 14px;
}

.workspace-toolbar-copy {
  display: grid;
  gap: 6px;
  max-width: 56ch;
}

.workspace-toolbar h2 {
  font-size: clamp(1.02rem, 1.2vw, 1.24rem);
  line-height: 1.12;
}

.preset-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 12px;
  overflow: visible;
}

.preset-card,
.choice-card,
.theme-chip,
.stats-card,
.toggle-card,
.tech-chip,
.mobile-panel-switch button,
.preview-mode-switch button {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.preset-card {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 16px;
  text-align: left;
}

.preset-title,
.choice-title,
.toggle-title,
.project-row-title,
.section-title,
.theme-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.preset-description,
.choice-description,
.toggle-description,
.theme-subtitle,
.stats-card-code {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.preset-card.is-active,
.choice-card.is-active,
.theme-chip.is-active,
.stats-card.is-active,
.toggle-card.is-active,
.tech-chip.is-active,
.mobile-panel-switch button.is-active,
.preview-mode-switch button.is-active {
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.52);
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.1);
  box-shadow: 0 0 0 1px rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.15);
}

.preview-mode-switch {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-mode-switch button {
  min-height: 46px;
  padding: 12px 16px;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.mobile-panel-switch {
  display: none;
  gap: 10px;
  margin: 0 0 12px;
}

.mobile-panel-switch button {
  flex: 1;
  padding: 13px 16px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 18px;
  align-items: start;
}

.editor {
  display: grid;
  gap: 16px;
}

.preview-shell {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 0;
  min-height: 0;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

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

.field,
.project-field,
.field--search {
  display: grid;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field input,
.field textarea,
.project-field input,
.project-field textarea,
.social-field input,
.repeater-main input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 15px;
  font-family: "Space Mono", monospace;
  font-size: 0.92rem;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.field textarea,
.project-field textarea {
  resize: vertical;
  min-height: 100px;
}

.field input::placeholder,
.field textarea::placeholder,
.project-field input::placeholder,
.project-field textarea::placeholder,
.social-field input::placeholder,
.repeater-main input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.field input:focus,
.field textarea:focus,
.project-field input:focus,
.project-field textarea:focus,
.social-field input:focus,
.repeater-main input:focus {
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.12);
  outline: none;
}

input:-webkit-autofill,
textarea:-webkit-autofill,
input:-webkit-autofill:hover,
textarea:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus {
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px rgba(11, 15, 26, 0.98) inset;
  transition: background-color 9999s ease-out 0s;
}

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

.social-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.social-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--social-accent, var(--text));
  font-size: 1.05rem;
}

.social-input-wrap {
  display: grid;
  gap: 6px;
}

.social-label {
  font-size: 0.88rem;
  color: var(--text-soft);
}

.social-field input {
  padding: 0;
  border: 0;
  background: transparent;
}

.social-field input:focus {
  box-shadow: none;
}

.subsection {
  margin-top: 24px;
}

.subsection + .subsection {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-head {
  margin-bottom: 12px;
  justify-content: space-between;
}

.section-head--stack {
  display: grid;
  justify-content: flex-start;
  align-items: start;
  gap: 6px;
}

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

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

.choice-card,
.toggle-card {
  padding: 16px;
  text-align: left;
}

.choice-card--compact {
  min-height: 110px;
}

.theme-stack {
  display: grid;
  gap: 14px;
}

.theme-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.theme-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-group-title {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.theme-group-copy {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.theme-chip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px;
  text-align: left;
  border-radius: 16px;
}

.theme-swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.theme-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.theme-subtitle {
  word-break: break-word;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

.stats-card {
  display: grid;
  gap: 8px;
  overflow: hidden;
  padding: 0;
}

.stats-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 14px;
  font-family: "Space Mono", monospace;
  font-size: 0.86rem;
  text-align: center;
}

.stats-card-code {
  padding: 0 14px 14px;
  margin-top: 0;
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
}

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

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toggle-copy {
  display: grid;
  gap: 6px;
}

.toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle-card.is-active .toggle-switch {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.9);
}

.toggle-card.is-active .toggle-switch::after {
  transform: translateX(22px);
}

.tech-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: 14px;
  margin-bottom: 20px;
}

.custom-tech-entry {
  align-items: end;
  flex-wrap: nowrap;
  gap: 10px;
}

.custom-tech-entry .field {
  flex: 1;
}

.tech-groups {
  display: grid;
  gap: 20px;
}

.tech-group {
  display: grid;
  gap: 12px;
}

.tech-group + .tech-group {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-grid,
.custom-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  text-align: left;
}

.tech-chip-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.tech-chip-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.tech-chip-fallback,
.tech-chip-icon-image {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.tech-chip-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-family: "Space Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tech-chip-icon-image {
  position: absolute;
  inset: 0;
  display: block;
}

.tech-chip-icon.has-image .tech-chip-fallback {
  display: none;
}

.custom-tech-pill,
.preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.custom-tech-pill {
  padding-right: 8px;
}

.custom-tech-pill-text {
  font-family: "Space Mono", monospace;
}

.custom-tech-pill .icon-button {
  min-width: 28px;
  min-height: 28px;
  padding: 4px 8px;
}

.empty-search {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.language-rows,
.project-rows {
  display: grid;
  gap: 12px;
}

.repeater-row,
.project-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.repeater-row {
  grid-template-columns: minmax(0, 1fr) minmax(148px, auto) auto;
  align-items: center;
}

.repeater-main {
  display: grid;
  gap: 8px;
}

.repeater-main input {
  min-width: 0;
}

.language-levels {
  display: grid;
  gap: 8px;
  align-self: center;
}

.language-level-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.level-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.level-dot.is-active {
  background: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.92);
  border-color: rgba(var(--accent-r), var(--accent-g), var(--accent-b), 0.92);
}

.helper-copy--inline {
  margin-top: 2px;
}

.project-row-head {
  justify-content: space-between;
}

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

.project-row-head,
.project-field:first-of-type {
  grid-column: 1 / -1;
}

.output-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.output-rail-copy {
  display: grid;
  gap: 8px;
}

.output-rail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.output-rail h2 {
  max-width: 24ch;
  font-size: clamp(1.08rem, 1.25vw, 1.35rem);
  line-height: 1.08;
}

.draft-status {
  min-height: 1.2em;
}

.draft-status[data-tone="success"] {
  color: var(--success);
}

.draft-status[data-tone="danger"] {
  color: #ffbdc7;
}

.output-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 16px;
  gap: 10px;
}

.output-actions .button {
  width: 100%;
  justify-content: center;
}

.output-panel {
  scroll-margin-top: 24px;
}

.output-code {
  margin: 0;
  min-height: 300px;
  padding: 22px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.34);
  color: #98f6c2;
  font-family: "Space Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-toolbar h2 {
  margin: 6px 0 0;
  font-size: clamp(1.12rem, 1.3vw, 1.38rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.preview-toolbar-copy {
  max-width: 32ch;
  color: var(--text-muted);
}

.preview-content {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.preview-readme {
  padding: 28px;
  border-radius: 18px;
  background: #0d1117;
  border: 1px solid #30363d;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.preview-content::-webkit-scrollbar {
  width: 10px;
}

.preview-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.markdown-body {
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 24px 0 16px;
  padding-bottom: 0.3em;
  font-weight: 600;
  line-height: 1.25;
  border-bottom: 1px solid #21262d;
}

.markdown-body h1 {
  font-size: 2rem;
}

.markdown-body h2 {
  font-size: 1.5rem;
}

.markdown-body h3 {
  font-size: 1.25rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body blockquote,
.markdown-body hr,
.markdown-body picture,
.markdown-body .markdown-align-center,
.markdown-body sub {
  margin: 16px 0;
}

.markdown-body ul {
  padding-left: 2em;
}

.markdown-body li + li {
  margin-top: 0.25em;
}

.markdown-body a {
  color: #58a6ff;
  text-decoration: none;
}

.markdown-body a:hover {
  text-decoration: underline;
}

.markdown-body strong {
  color: #f0f6fc;
  font-weight: 600;
}

.markdown-body hr {
  height: 0.25em;
  padding: 0;
  border: 0;
  background-color: #21262d;
}

.markdown-body blockquote {
  padding: 0 1em;
  color: #8b949e;
  border-left: 0.25em solid #30363d;
}

.markdown-body blockquote > :first-child {
  margin-top: 0;
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body img,
.markdown-body picture {
  max-width: 100%;
}

.markdown-body img {
  height: auto;
  vertical-align: middle;
  background-color: transparent;
}

.markdown-body a + a,
.markdown-body a + img,
.markdown-body img + a,
.markdown-body img + img {
  margin-left: 8px;
}

.markdown-body .markdown-align-center {
  text-align: center;
}

.markdown-body .markdown-align-center > :first-child {
  margin-top: 0;
}

.markdown-body .markdown-align-center > :last-child {
  margin-bottom: 0;
}

.markdown-body sub {
  display: block;
  color: #8b949e;
}

.preview-banner,
.preview-card-image,
.preview-footer-wave,
.preview-inline-image {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.preview-inline-image {
  width: auto;
  max-width: 100%;
}

.preview-hero {
  margin: 14px 0 8px;
}

.preview-hero--center {
  text-align: center;
}

.preview-badge-row {
  margin-top: 14px;
  gap: 8px;
}

.preview-badge-row img {
  height: 24px;
}

.preview-badge-row--compact img {
  height: 21px;
}

.preview-typing {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.94), rgba(13, 17, 23, 0.92));
}

.preview-typing-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #d9fce8;
}

.preview-typing-prompt,
.preview-typing-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

.preview-typing-prompt {
  flex-shrink: 0;
  color: #58a6ff;
}

.preview-typing-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview-typing-line:last-child .preview-typing-text::after {
  content: " |";
  color: rgba(88, 166, 255, 0.65);
}

.preview-section,
.preview-footer,
.preview-extra {
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid #30363d;
}

.preview-section--minimal,
.preview-section--callout {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.preview-h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.05;
}

.preview-h2 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b949e;
}

.preview-h2--large {
  font-size: 1.2rem;
  color: #f0f6fc;
  letter-spacing: -0.02em;
  text-transform: none;
}

.preview-role {
  margin: 0 0 12px;
  color: #8b949e;
}

.preview-list {
  margin: 0;
  padding-left: 18px;
  color: #c9d1d9;
}

.preview-list li + li {
  margin-top: 8px;
}

.preview-projects,
.preview-stack-groups {
  display: grid;
  gap: 14px;
}

.preview-project {
  padding: 14px;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.preview-project-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.preview-link {
  color: #58a6ff;
  text-decoration: none;
  word-break: break-all;
}

.preview-muted-label {
  margin: 0 0 8px;
  color: #8b949e;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-language-list {
  display: grid;
  gap: 10px;
}

.preview-language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #21262d;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.preview-language-name {
  color: #f0f6fc;
}

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

.preview-card-image--full {
  margin-top: 10px;
}

.preview-quote {
  margin: 0;
  padding: 0 0 0 14px;
  border-left: 3px solid #30363d;
  color: #c9d1d9;
}

.preview-empty {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: var(--text-muted);
  text-align: center;
  font-family: "Space Mono", monospace;
  padding: 24px;
}

.site-footer {
  margin-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-family: "Space Mono", monospace;
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--text-soft);
}

#quote-field.is-disabled {
  opacity: 0.5;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
  }
}

@media (min-width: 1101px) {
  .workspace[data-preview-mode="editor"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace[data-preview-mode="editor"] .preview-shell {
    display: none;
  }
}

@media (max-width: 1100px) {
  .workspace-toolbar {
    display: none;
  }

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

  .preview-shell {
    position: static;
  }

  .preview-panel {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .mobile-panel-switch {
    display: flex;
  }

  .workspace[data-mobile-panel="form"] .preview-shell {
    display: none;
  }

  .workspace[data-mobile-panel="preview"] .editor {
    display: none;
  }
}

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

  .hero-side {
    gap: 12px;
  }

  .field-grid--two,
  .field-grid--three,
  .social-grid,
  .choice-grid,
  .choice-grid--compact,
  .theme-grid,
  .stats-grid,
  .toggle-grid,
  .project-row {
    grid-template-columns: 1fr;
  }

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

  .tech-toolbar {
    grid-template-columns: 1fr;
  }

  .custom-tech-entry {
    flex-wrap: wrap;
  }

  .output-rail {
    grid-template-columns: 1fr;
  }

  .preview-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 24px;
  }

  .hero,
  .preset-strip,
  .editor > .panel,
  .preview-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 13vw, 3rem);
  }

  .preview-toolbar {
    padding-bottom: 16px;
  }

  .output-actions {
    gap: 10px;
  }

  .output-actions .button {
    width: 100%;
    justify-content: center;
  }

  .button,
  .mobile-panel-switch button {
    width: 100%;
  }
}
