/* Basis bersama demo proyek.
   Hanya memuat reset, penanda mode demo, dan kerangka field supaya tiap demo
   bebas menentukan arah visualnya sendiri di <slug>.css. */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

button { font: inherit; cursor: pointer; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Penanda bahwa ini demo, bukan situs produksi. */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .85;
}

.demo-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}

/* Kerangka field: tiap demo menimpa warna, radius, dan tipografinya. */
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.fld-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
}

.fld-unit {
  font-weight: 400;
  opacity: .7;
}

.fld-req {
  margin-left: 3px;
  color: #C2410C;
  font-weight: 700;
}

.fld-input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: inherit;
}

.fld-hint {
  margin: 0;
  font-size: 12.5px;
  opacity: .72;
}

.fld-error {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.fld.is-error .fld-input { border-width: 2px; }

.fld-radio .opt,
.opt-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
}

.fld-radio .opt input,
.opt-check input { accent-color: currentColor; }

.opt-text { flex: 1 1 auto; }

.opt-hint { font-size: 12px; opacity: .7; }

.opt-add { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
