/**
 * Public definition form — packet language (docs/design/TOKENS.md).
 * Tokens live next to this file so a deploy of assets/ is enough.
 */
@import url('tokens.css');
body.dg-public-portal,
body.single-portal {
  background-color: var(--paper);
  color: var(--ink);
}

.dg-public-main {
  width: min(var(--measure), calc(100vw - 2.5rem));
  max-width: none;
  margin-inline: auto;
  padding: var(--s-6) var(--s-4) var(--s-8);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

body.single-portal .dg-public-main,
body.single-portal .dg-public-main.alignfull,
body.single-portal article.dg-packet,
body.single-portal .dg-public-main > .dg-packet {
  width: min(var(--measure), calc(100vw - 2.5rem));
  max-width: var(--measure);
  margin-inline: auto;
}

body.single-portal .dg-public-main.alignfull {
  left: auto;
  transform: none;
}

body.single-portal form.dg-portal-submit-form {
  max-width: var(--measure);
  width: min(var(--measure), 100%);
  align-items: stretch;
}

body.single-portal form.dg-portal-submit-form fieldset {
  max-width: none;
  width: 100%;
}

.dg-packet,
.dg-public-application {
  position: relative;
  background: var(--paper-50);
  border: 1px solid var(--brass-200);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-shell);
  padding: var(--s-6) var(--s-6) var(--s-6);
  margin-block: var(--s-4);
  color: var(--ink-600);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  line-height: var(--lh-prose);
  overflow: visible;
}

.dg-packet .dg-packet {
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}

.dg-packet-head,
.dg-public-application-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-4);
  align-items: center;
  margin-block-end: 0;
}

.dg-packet-head--no-seal,
.dg-public-application-head.dg-packet-head--no-seal {
  grid-template-columns: 1fr;
}

.dg-seal {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.dg-public-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 var(--s-1);
}

.dg-packet-title,
.dg-public-application-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--t-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.dg-rule-ornament {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-5) 0 var(--s-4);
  color: var(--brass);
}

.dg-rule-ornament::before,
.dg-rule-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass-200), transparent);
}

.dg-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  align-items: center;
  font-size: var(--t-small);
  color: var(--ink-600);
  line-height: var(--lh-snug);
}

.dg-meta-split {
  display: none;
  width: 1px;
  height: 28px;
  background: var(--rule-strong);
}

.dg-meta-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
}

.dg-meta-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--ink-400);
}

.dg-meta-when {
  display: block;
}

.dg-meta-tz {
  display: block;
  font-size: var(--t-caption);
  color: var(--ink-400);
}

.dg-meta-link {
  color: var(--ember-600);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.dg-meta-link:hover {
  text-decoration: underline;
}

.dg-preview-banner,
.dg-view-as-banner,
.dg-test-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  background: var(--ember-100);
  border: 1px solid var(--ember-100);
  color: var(--ink-800);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  font-size: var(--t-small);
  line-height: var(--lh-snug);
}

.dg-preview-banner strong,
.dg-view-as-banner strong,
.dg-test-banner strong {
  display: block;
  font-size: var(--t-body);
}

.dg-form.portal-definition-form {
  margin-block: var(--s-5) 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.dg-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-4);
}

.dg-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-1);
  min-width: 0;
}

.dg-grid {
  display: grid;
  gap: var(--s-4);
}

/* Mobile-first. Breakpoints match Tailwind: sm 640, md 768. */
.dg-grid-title-name,
.dg-grid-2,
.dg-grid-3,
.dg-grid-zip-phone {
  grid-template-columns: 1fr;
}

.dg-packet fieldset,
.dg-form.portal-definition-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--s-6);
  background: transparent;
}

.dg-packet legend,
.dg-form.portal-definition-form legend,
.dg-section legend {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  width: 100%;
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin: 0 0 var(--s-4);
}

.dg-packet legend::after,
.dg-form.portal-definition-form legend::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.dg-packet label,
.dg-form.portal-definition-form label,
.dg-field-label {
  text-align: left;
  padding-right: 0;
  font-weight: 600;
  font-size: var(--t-small);
  color: var(--ink-800);
}

.dg-req {
  color: var(--ember);
  font-weight: 600;
  margin-inline-start: 0.15em;
}

.dg-form.portal-definition-form .caption,
.dg-file-hint {
  color: var(--ink-400);
  font-weight: 400;
  font-size: var(--t-caption);
}

.dg-section .dg-grid + .dg-grid,
.dg-section .dg-grid + .dg-field,
.dg-section .dg-field + .dg-grid {
  margin-top: var(--s-4);
}

.dg-control,
.dg-packet input[type='text'],
.dg-packet input[type='email'],
.dg-packet input[type='tel'],
.dg-packet select,
.dg-packet textarea,
.dg-form.portal-definition-form input[type='text'],
.dg-form.portal-definition-form input[type='email'],
.dg-form.portal-definition-form input[type='tel'],
.dg-form.portal-definition-form select,
.dg-form.portal-definition-form textarea {
  width: 100%;
  max-width: none;
  min-height: 44px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-2);
  background-color: var(--paper-50);
  color: var(--ink);
  padding: 0 var(--s-3);
  font-family: var(--font-ui);
  font-size: var(--t-body);
  box-sizing: border-box;
  transition:
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease);
}

.dg-packet select,
.dg-packet select.dg-control,
.dg-form.portal-definition-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236E7460' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 36px;
}

.dg-packet select::-ms-expand {
  display: none;
}

.dg-form.portal-definition-form textarea.dg-control {
  min-height: 8rem;
  padding: var(--s-2) var(--s-3);
}

.dg-control:hover,
.dg-form.portal-definition-form input:hover,
.dg-form.portal-definition-form select:hover,
.dg-form.portal-definition-form textarea:hover {
  border-color: var(--ink-400);
}

.dg-control:focus,
.dg-form.portal-definition-form input:focus,
.dg-form.portal-definition-form select:focus,
.dg-form.portal-definition-form textarea:focus,
.dg-file:focus-within {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dg-file,
.dg-packet .dg-file,
.dg-form.portal-definition-form .dg-file {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-2);
  min-height: 72px;
  background: var(--paper-50);
  gap: 0;
  align-items: stretch;
}

.dg-file.is-ready,
.dg-file.is-staged {
  border-style: solid;
}

.dg-file.is-dragover {
  border-color: var(--ember);
  background: var(--ember-100);
}

.dg-file.is-invalid {
  background: var(--error-100);
  border-color: color-mix(in srgb, var(--error) 35%, var(--rule-strong));
  border-style: solid;
}

.dg-file.is-uploading .dg-file-confirm,
.dg-file.is-working .dg-file-confirm {
  opacity: 0.55;
  pointer-events: none;
}

.dg-file-progress {
  display: none;
  width: 100%;
  height: 6px;
  margin-top: var(--s-2);
  border-radius: 999px;
  background: var(--rule);
  overflow: hidden;
}

.dg-file.is-uploading .dg-file-progress {
  display: block;
}

.dg-file-progress[hidden] {
  display: none !important;
}

.dg-file-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ember);
  transition: width 120ms linear;
}

.dg-file-status {
  display: none;
  margin: var(--s-2) 0 0;
  font-size: var(--t-caption);
  color: var(--ink-400);
}

.dg-file.is-working .dg-file-status {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.dg-file-status[hidden] {
  display: none !important;
}

.dg-file-status::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--ember);
  border-radius: 50%;
  animation: dg-file-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes dg-file-spin {
  to {
    transform: rotate(360deg);
  }
}

.dg-file-spec {
  padding: var(--s-4);
  border-right: 0;
  border-bottom: 1px solid var(--rule);
}

.dg-file-spec .dg-field-label {
  display: block;
  margin-bottom: 2px;
}

.dg-file-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  min-width: 0;
}

.dg-file-pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  min-height: 40px;
}

.dg-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

.dg-file.is-ready .dg-file-input {
  display: none;
}

.dg-file-empty {
  font-size: var(--t-small);
  color: var(--ink-400);
}

.dg-file-empty em {
  font-style: normal;
  color: var(--ember-600);
  font-weight: 500;
}

.dg-file-ready {
  display: none;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-width: 0;
}

.dg-file.is-ready .dg-file-empty {
  display: none;
}

.dg-file.is-ready .dg-file-ready {
  display: flex;
}

.dg-file-icon {
  width: 36px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-1);
  background: var(--paper);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  color: var(--ember-600);
}

.dg-file-meta {
  flex: 1;
  min-width: 0;
}

.dg-file-name {
  display: block;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg-file-size {
  display: block;
  font-size: var(--t-caption);
  color: var(--ink-400);
  margin-top: 2px;
}

.dg-file-confirm {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-3);
}

.dg-file.is-ready .dg-file-confirm {
  display: flex;
}

body.single-portal .dg-packet .dg-file-open,
body.single-portal button.dg-file-open {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ember-600);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

body.single-portal .dg-packet .dg-file-open:hover,
body.single-portal .dg-packet .dg-file-open:focus-visible,
body.single-portal button.dg-file-open:hover,
body.single-portal button.dg-file-open:focus-visible {
  border-color: var(--ember);
  background: var(--paper);
  color: var(--ember-600);
}

body.single-portal .dg-packet .dg-file-open:focus-visible,
body.single-portal button.dg-file-open:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.dg-file-confirm-copy {
  font-size: var(--t-caption);
  color: var(--ink-400);
}

.dg-file.is-opened .dg-file-confirm-copy {
  color: var(--success);
}

.dg-file-error {
  display: none;
  font-size: var(--t-caption);
  color: var(--error);
}

.dg-file.is-invalid .dg-file-error {
  display: block;
  color: var(--error);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dg-file-swap {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-400);
  font: 500 12.5px/1.3 var(--font-ui);
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.dg-file-swap:hover {
  color: var(--ink);
}

.dg-packet .dg-field--disclaimer {
  display: block;
  width: 100%;
}

.dg-packet .dg-check,
.dg-form.portal-definition-form .dg-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 2px 0;
  overflow: visible;
}

.dg-packet .dg-check span {
  min-width: 0;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--ink-800);
}

.dg-packet .dg-check input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  flex: 0 0 20px;
  border: 1.5px solid var(--rule-strong);
  border-radius: 4px;
  background-color: var(--paper-50);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  box-shadow: none;
}

.dg-packet .dg-check input[type='checkbox']:checked {
  background-color: var(--ember);
  border-color: var(--ember);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'><path d='M2.2 6.2 4.8 8.7 9.8 3.3' stroke='%23FCFBF6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

.dg-packet .dg-check input[type='checkbox']:checked::after {
  content: none;
}

.dg-packet .dg-check input[type='checkbox']:focus,
.dg-packet .dg-check input[type='checkbox']:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--paper-50),
    0 0 0 3px var(--ember);
}

.dg-check label {
  display: contents;
  font-weight: 500;
}

.dg-form.portal-definition-form .dg-field--static_html,
.dg-form.portal-definition-form .dg-disclaimer-text {
  color: var(--ink-600);
  font-size: var(--t-small);
}

.dg-choice-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-3);
}

.dg-packet .dg-branch-option,
.dg-form.portal-definition-form .dg-branch-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.dg-packet .dg-branch-option label,
.dg-form.portal-definition-form .dg-branch-option label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--s-3);
  width: auto;
  max-width: 100%;
  text-align: left;
  font-weight: 500;
}

/* Keep radios intrinsic. Host themes often stretch every input to 100%. */
.dg-packet .dg-branch-option input[type='radio'],
.dg-form.portal-definition-form .dg-branch-option input[type='radio'] {
  appearance: auto;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1.15rem;
  grid-column: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dg-form.portal-definition-form .dg-branch-children:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-block-start: var(--s-4);
  padding-block-start: var(--s-3);
  border-block-start: 1px solid var(--rule);
}

.dg-submit-errors {
  background: var(--error-100);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  color: var(--error);
  margin-block: var(--s-4);
}

.dg-portal-closed,
.dg-receipt {
  text-align: center;
  padding: var(--s-6) var(--s-2) var(--s-2);
}

.dg-portal-closed p,
.dg-receipt h2 {
  font-family: var(--font-display);
  font-size: var(--t-h1);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--s-2);
}

.dg-receipt p {
  font-family: var(--font-ui);
  font-size: var(--t-body);
  font-weight: 400;
  color: var(--ink-600);
}

.dg-submit-success,
.dg-access {
  max-width: 36rem;
  margin: var(--s-5) auto 0;
  padding: var(--s-6);
  text-align: center;
  background: var(--paper-50);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
}

.dg-submit-success .dg-public-eyebrow,
.dg-access .dg-public-eyebrow {
  margin-bottom: var(--s-2);
}

.dg-submit-success h2,
.dg-access h2 {
  font-family: var(--font-display);
  font-size: var(--t-h1);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--ink);
  margin: 0 0 var(--s-3);
}

.dg-submit-success p,
.dg-access p {
  font-family: var(--font-ui);
  font-size: var(--t-body);
  font-weight: 400;
  color: var(--ink-600);
  margin: 0 0 var(--s-3);
}

.dg-submit-success .dg-app-id {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: var(--s-5);
}

.dg-submit-success .dg-public-submit,
.dg-access .dg-public-submit {
  display: inline-flex;
  min-width: min(100%, 240px);
  text-decoration: none;
}

.dg-file-preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--s-4);
}

.dg-file-preview[hidden] {
  display: none;
}

.dg-file-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
}

.dg-file-preview-panel {
  position: fixed;
  z-index: 41;
  inset: 0;
  margin: auto;
  height: fit-content;
  display: flex;
  flex-direction: column;
  width: min(52rem, calc(100vw - 2rem));
  max-height: min(90vh, 48rem);
  background: var(--paper-50);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-shell);
  overflow: hidden;
}

.dg-file-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--rule);
}

.dg-file-preview-title {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.dg-file-preview-close {
  appearance: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink-800);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  min-height: 36px;
  padding: 0 16px;
  cursor: pointer;
}

.dg-file-preview-body {
  flex: 1;
  min-height: 12rem;
  background: var(--paper);
}

.dg-file-preview-media {
  display: block;
  width: 100%;
  height: min(70vh, 40rem);
  border: 0;
  background: var(--paper);
}

audio.dg-file-preview-media {
  height: auto;
  margin: var(--s-6) auto;
  width: min(100%, 28rem);
}

img.dg-file-preview-media {
  height: auto;
  max-height: min(70vh, 40rem);
  object-fit: contain;
  margin-inline: auto;
}

.dg-actions,
.sub_submit_container {
  display: flex;
  justify-content: center;
  margin-top: var(--s-6);
}

body.single-portal .dg-actions .dg-public-submit,
body.single-portal button.dg-public-submit,
body.single-portal .dg-access .dg-public-submit,
body.single-portal .dg-submit-success .dg-public-submit,
.dg-form.portal-definition-form + .sub_submit_container .dg-public-submit,
.sub_submit_container .dg-public-submit,
.dg-access .dg-public-submit,
.dg-submit-success .dg-public-submit {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 360px);
  min-height: 48px;
  padding: 0 var(--s-6);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--ember-flow);
  color: var(--paper-50);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  box-shadow: var(--shadow-ember);
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease),
    filter var(--dur-fast) var(--ease);
}

body.single-portal .dg-actions .dg-public-submit:hover,
body.single-portal .dg-actions .dg-public-submit:focus,
body.single-portal button.dg-public-submit:hover,
body.single-portal button.dg-public-submit:focus,
.dg-public-submit:hover,
.dg-public-submit:focus {
  background: var(--ember-flow);
  color: var(--paper-50);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

body.single-portal .dg-actions .dg-public-submit:focus,
body.single-portal button.dg-public-submit:focus,
.dg-public-submit:focus {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-ember);
}

body.single-portal .dg-actions .dg-public-submit:disabled,
body.single-portal button.dg-public-submit:disabled,
.dg-form.portal-definition-form + .sub_submit_container .dg-public-submit:disabled,
.sub_submit_container .dg-public-submit:disabled,
.dg-public-submit:disabled {
  background: var(--ember-flow);
  opacity: 0.7;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.dg-submit-spinner {
  width: 16px;
  height: 16px;
  margin-inline-end: var(--s-2);
  border: 2px solid color-mix(in srgb, var(--paper-50) 35%, transparent);
  border-top-color: var(--paper-50);
  border-radius: 50%;
  animation: dg-file-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .dg-submit-spinner {
    animation: none;
    border-top-color: var(--paper-50);
  }
}

body.single-portal .cs-replacer,
body.single-portal .custom-sidebars-replacer,
body.single-portal [class*='Sidebar Infos'],
body.dg-public-portal .widget_custom_sidebars {
  display: none !important;
}

@media (min-width: 640px) {
  .dg-grid-title-name {
    grid-template-columns: 140px 1fr;
  }

  .dg-grid-2,
  .dg-grid-zip-phone {
    grid-template-columns: 1fr 1fr;
  }

  .dg-grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .dg-grid-3 > .dg-field:first-child {
    grid-column: 1 / -1;
  }

  .dg-file,
  .dg-packet .dg-file,
  .dg-form.portal-definition-form .dg-file {
    grid-template-columns: 210px 1fr;
  }

  .dg-file-spec {
    border-right: 1px solid var(--rule);
    border-bottom: 0;
  }
}

@media (min-width: 768px) {
  .dg-packet-head,
  .dg-public-application-head {
    grid-template-columns: 76px 1fr;
    gap: var(--s-5);
  }

  .dg-packet-head--no-seal,
  .dg-public-application-head.dg-packet-head--no-seal {
    grid-template-columns: 1fr;
  }

  .dg-seal {
    width: 76px;
    height: 76px;
  }

  .dg-meta {
    grid-template-columns: 1fr auto 1fr auto auto;
    gap: 0 var(--s-4);
  }

  .dg-meta-split {
    display: block;
  }

  .dg-grid-3 {
    grid-template-columns: 1.1fr 1.1fr 1fr;
  }

  .dg-grid-3 > .dg-field:first-child {
    grid-column: auto;
  }

  .dg-grid-zip-phone {
    grid-template-columns: 220px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
