:root { --preview-height: 52px; scroll-padding-top: calc(var(--preview-height) + 1px); }
body { padding-top: var(--preview-height); }
[data-theme="original"] { scroll-behavior: auto; }
.skip-link { position: fixed; top: .25rem; left: .5rem; z-index: 12; transform: translateY(-160%); background: #fff; color: #1c211a; padding: .75rem 1rem; }
.skip-link:focus { transform: none; }

.preview-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 11;
  min-height: var(--preview-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  padding: .3rem .65rem;
  border-bottom: 1px solid #454747;
  background: #202326;
  color: #f6f6f3;
  font: 400 .875rem/1.5 "DM Sans", system-ui, sans-serif;
}
.preview-bar p { margin: 0; color: #e1e1dc; }
.theme-switch { display: flex; gap: .2rem; padding: .15rem; border: 1px solid #777976; border-radius: 100px; }
.theme-switch :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: .18rem .75rem;
  border: 0;
  border-radius: 100px;
  color: inherit;
  background: transparent;
  font-family: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.theme-switch :is(button, a):hover { background: #414548; }
.theme-switch :is([aria-pressed="true"], [aria-current="page"]) { background: #f6f6f3; color: #222523; }
.theme-switch :is([aria-pressed="true"], [aria-current="page"]):hover { background: #fff; color: #222523; }

.preview-form .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.preview-form :is(.field-error, .form-error, [data-error]) { color: #962b31; }
.preview-form .field-error { display: block; margin-top: .3rem; font-size: .9rem; }
[data-theme]:not([data-theme="original"]) .form-success svg { width: 2rem; margin-bottom: .8rem; }
[data-theme]:not([data-theme="original"]) .form-success p { margin-block: .8rem 1rem; }

@media (max-width: 630px) {
  .preview-bar p { display: none; }
}
@media (max-width: 474px) {
  :root { --preview-height: 90px; }
  .theme-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 25rem);
    border-radius: 1rem;
  }
  .theme-switch :is(button, a) { padding-inline: .45rem; border-radius: .72rem; }
}
