:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #5b6b7b;
  --border: #e5e7eb;
  --brand: #cb625c;
  --brand-strong: #b3544f;
  --brand-50: #fdeceb;
  --brand-100: #fad4d2;
  --brand-600: #a94f49;
  --success: #16a34a;
}
img{max-width: 100%;}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: 64px; position: relative; }
.header-inner::after { content: ""; display: table; clear: both; }
.brand { color: var(--brand); text-decoration: none; font-weight: 800; letter-spacing: 0.4px; font-size: 20px; }
.brand:hover { color: var(--brand-600); }
.brand { display: inline-block; line-height: 64px; }
.nav { float: right; line-height: 64px; }
.nav-group { display: inline-block; }
.nav-group + .nav-group { margin-left: 16px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; display: inline-block; margin: 0 6px; }
.nav a:hover { color: var(--brand); }

/* Hover dropdown for Input Types */
.dropdown-panel { position: absolute; display: none; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); padding: 4px; z-index: 1000; }
.dropdown-panel a { display: block; padding: 6px 10px; line-height: 1.2; color: var(--text); text-decoration: none; white-space: nowrap; border-radius: 8px; }
.dropdown-panel a:hover { background: var(--brand-50); color: var(--brand); }

/* Mobile menu */
.menu-toggle { display: none; background: transparent; border: 0; padding: 8px; border-radius: 8px; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
.menu-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hamburger { width: 24px; height: 2px; background: var(--text); display: inline-block; position: relative; }
.hamburger::before, .hamburger::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: var(--text); }
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.hero { padding: 40px 0 10px; text-align: left; }
.hero h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); }
.hero-grid { font-size: 0; }
.hero-copy, .hero-illustration { display: inline-block; vertical-align: middle; font-size: 16px; }
.hero-copy { width: 60%; }
.hero-illustration { width: 40%; text-align: right; }
.hero-illustration img { width: 100%;max-width:200px; height: auto; border-radius: 24px; box-shadow: 0 20px 60px rgba(203,98,92,0.25); }

.hero-badges { margin: 18px 0 16px; }
.badge { display: inline-block; background: #fff; color: var(--text); border: 1px solid var(--border); padding: 10px 12px; border-radius: 12px; margin: 6px 10px 0 0; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }

.hero-actions { margin-top: 18px; }
.btn-lg { padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

.generator { padding: 24px 0 48px; }
.grid { font-size: 0; }
.grid .panel { display: inline-block; vertical-align: top; width: 49%; font-size: 16px; }
.grid .panel + .panel { margin-left: 2%; }
.panel-config { min-height: 720px; }
.panel-code { min-height: 720px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.panel-title { margin: 0 0 12px; font-size: 16px; color: var(--muted); font-weight: 600; }

.form-grid { display: block; }
.form-row { display: block; margin-bottom: 12px; }
.form-row-inline > div { display: inline-block; vertical-align: bottom; }
.form-row-inline > div:first-child { width: calc(70% - 6px); margin-right: 12px; }
.checkbox-inline { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }

label { font-size: 12px; color: var(--muted); }
input[type="text"], input[type="number"], select {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
input::placeholder { color: #9aa6b2; }

.toggles { display: block; }
.checkbox { display: inline-block; font-size: 13px; color: var(--text); margin: 0 16px 8px 0; }
.checkbox input { vertical-align: middle; margin-right: 8px; }
.checkbox input { width: 16px; height: 16px; }

.form-actions { text-align: right; }
.btn { text-decoration: none;background: var(--brand); color: #ffffff; border: 0; padding: 10px 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--brand-strong); color:#fff}
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }

.preview {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 18px 10px 10px;overflow: auto;
  min-height: 140px; /* reduce layout shift by reserving space */
}

.code-toolbar { position: relative; }
.code-block { margin: 12px 0 0; border-radius: 12px; border: 1px solid var(--border); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; min-height: 120px; }
#codeBlock { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; display: block; }
.code-editor { display: none; width: 100%; min-height: 160px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; }
.toolbar { margin-top: 10px; text-align: right; }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); background: #fafafa; }
.footer-inner { display: block; }
.small { font-size: 12px; }

/* Responsive */
@media (max-width: 960px) {
  .grid .panel { width: 100%; margin-left: 0; display: block; }
  .panel-config, .panel-code { min-height: 0; }
  .hero-copy, .hero-illustration { width: 100%; display: block; }
  .hero-illustration { text-align: left; margin-top: 16px; }
  .menu-toggle { display: inline-block; }
  .nav { position: static; display: none; line-height: 1.6; padding: 12px 0; background: #fff; border-bottom: 1px solid var(--border); width: 100%; }
  .nav.open { display: block; }
  .nav-group { display: block; }
  .nav a { display: block; padding: 8px 0; margin: 0; }
  .form-row-inline > div { display: block; width: 100% !important; margin-right: 0; }
}

/* Back to Top button (simple version from HTML-Online) */
#back2Top {
  width: 40px;
  line-height: 40px;
  overflow: hidden;
  opacity: 0.8;
  z-index: 999;
  border-radius: 10px 10px 0 0;
  display: none;
  cursor: pointer;
  transform: rotate(270deg);
  position: fixed;
  bottom: 50px;
  right: 0;
  background-color: #cb625c;
  color: #ffffff;
  text-align: center;
  font-size: 30px;
  text-decoration: none;
}
#back2Top:hover {
  opacity: 1;
}

#generator + .content { padding: 24px 0 48px; }
.prose { color: var(--text); }
.prose h2 { font-size: 24px; margin: 0 0 12px; }
.prose h3 { font-size: 18px; margin: 18px 0 8px; }
.prose p { margin: 0 0 12px; color: var(--muted); }
.prose ol, .prose ul { margin: 0 0 12px 18px; }
.prose code { background: #f6f6f6; border: 1px solid var(--border); border-radius: 6px; font-size: 90%; padding: 1px 6px; }
.prose a { color: var(--brand); text-decoration: none; }
.prose a:hover { text-decoration: underline; }

/* Infographic article styles */
.infographic-grid { display: inline-block; width: 100%; font-size: 0; margin: 12px 0; }
.infographic-grid .card { display: inline-block; vertical-align: top; width: 49%; margin: 0 2% 12px 0; font-size: 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
.infographic-grid .card:nth-child(2n) { margin-right: 0; }
.infographic-grid h4 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.infographic-grid p { margin: 0 0 8px; color: var(--muted); }
.infographic-grid ul { margin: 0 0 8px 18px; }

/* Home tiles */
.tiles { padding: 12px 0 48px; }
.tile-grid { font-size: 0; }
.tile { display: inline-block; vertical-align: top; width: 32%; margin: 0 2% 20px 0; font-size: 16px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
.tile:nth-child(3n) { margin-right: 0; }
.tile-head { display: block; text-align: center; font-weight: 700; margin-bottom: 10px; }
.tile-head::before { content: attr(data-emoji); display: block; font-size: 36px; line-height: 1; margin-bottom: 6px; }
.tile-preview { margin: 8px 0 10px; }
.tile-preview input { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.tile-code { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; margin: 0 0 10px; }
.tile-actions { display: flex; justify-content: space-between; gap: 8px; }

@media (max-width: 960px) {
  .tile { width: 100%; margin-right: 0; }
}

@media (max-width: 960px) {
  .infographic-grid .card { width: 100%; margin-right: 0; }
}

/* Visibility helpers for attribute rows */
.show-for-textlike, .show-for-length, .show-for-pattern, .show-for-rangeable, .show-for-file, .show-for-checked, .show-for-multiple, .show-for-size { display: none; }
.is-textlike .show-for-textlike { display: grid; }
.is-textlike .show-for-length { display: grid; }
.is-textlike .show-for-pattern { display: grid; }
.is-textlike .show-for-size { display: grid; }
.is-rangeable .show-for-rangeable { display: grid; }
.is-file .show-for-file { display: grid; }
.is-checkable .show-for-checked { display: inline-flex; }
.is-multipliable .show-for-multiple { display: inline-flex; }

/* Preview input basic theme */
.preview input,
.preview textarea { all: revert; font: inherit; }
.preview label { all: revert; font: inherit; }


