body {
  font: 14.666px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, sans-serif;
  max-width: 720px;
  margin: 3rem auto;
  padding: 0 1rem;
}

form {
  display: grid;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns:1fr 1fr;
  gap: 6px;;
}

:root {
  --tip-icon: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" aria-hidden="true" viewBox="0 0 24 24" fill="%23555" opacity="0.75"><circle cx="12" cy="12" r="10" fill="none" stroke="%23555" stroke-width="1.5" opacity="0.75"/><path d="M12 17h.01M9.5 10.5a2.5 2.5 0 1 1 4.3 1.7c-.7.7-1.3 1-1.3 2.3" stroke="%23555" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none" opacity="0.75"/></svg>');
}

input, textarea, select {
  color: rgba(0, 0, 0, 0.8);;
}

input[title], textarea[title] {
  background-image: var(--tip-icon);
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2rem;
}

input[title] {
  background-position: right 10px center;
}

textarea[title] {
  background-position: right 10px top 10px;
}

.separator {
  border-top: 1px dashed rgba(0, 0, 0, .15);
  margin: .5rem 0;
}

#preview code {
  padding: 1.5em;
  max-height: 280px;
  font-size: 0.85em;
  overflow: auto;
}

.textarea-wrapper {
  margin-right: 6px;
}

textarea {
  line-height: inherit;
}

#demos {
  list-style: square;
  padding-left: 16px;
}

footer {
  text-align: center;
}

.input-container {
  position: relative;
  display: flex;
  width: 100%;
}

.input-container input {
  width: 100%;
  padding-left: 40px; /* Make space for the sticky text */
  box-sizing: border-box;
}

.input-container input[title] {
  padding-right: 2rem; /* Keep space for tooltip icon */
}

.sticky-text {
  position: absolute;
  left: 10px;
  top: 46%;
  transform: translateY(-50%);
  color: rgba(148, 148, 148, 1);
  pointer-events: none;
  font-size: 1em;
  font-weight: 400;
  z-index: 1;
}

/* Ensure placeholder is always visible alongside sticky text */
input::placeholder, textarea::placeholder {
  color: rgba(148, 148, 148, 0.5);
}

/* Special handling for inputs with different label lengths */
.input-container.url input {
  padding-left: 42px;
}

.input-container.item input {
  padding-left: 26px;
}

.input-container.title input {
  padding-left: 44px;
}

.input-container.link input {
  padding-left: 40px;
}

.input-container.desc input {
  padding-left: 46px;
}

.input-container.date input {
  padding-left: 46px;
}

.input-container.limit input {
  padding-left: 46px;
}

.input-container:has(input:disabled) .sticky-text {
  opacity: 0.5;
}
