@font-face {
  font-family: DocCinzel;
  src: url("/public/assets/fonts/print/cinzel/Cinzel-SemiBold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: DocSerif;
  src: url("/public/assets/fonts/print/source-serif-4/SourceSerif4-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: DocTypewriter;
  src: url("/public/assets/fonts/print/courier-prime/CourierPrime-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: DocSignature;
  src: url("/public/assets/fonts/print/eb-garamond/EBGaramond-Italic.ttf") format("truetype");
  font-display: swap;
}

body.document-studio-page {
  --doc-gold: #d2af68;
  --doc-gold-bright: #efd59b;
  --doc-paper: #d8c9a8;
  --doc-ink: #292219;
  --doc-panel: rgba(16, 13, 9, .94);
  --doc-line: rgba(220, 187, 118, .2);
  --doc-muted: rgba(241, 234, 219, .65);
  background: #070604;
  color: #f1eadb;
}

body.document-studio-page .experience-context-rail,
body.document-studio-page .experience-progress-rail,
body.document-studio-page .experience-edge,
body.document-studio-page .mobile-cinematic-fab,
body.document-studio-page .floating-tools {
  display: none !important;
}

.document-studio-main {
  min-height: 100vh;
  padding: clamp(6.4rem, 8vw, 7.5rem) 0 5rem;
  background:
    radial-gradient(circle at 12% 0, rgba(210, 175, 104, .12), transparent 31rem),
    radial-gradient(circle at 88% 36%, rgba(111, 82, 43, .08), transparent 34rem),
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px),
    #070604;
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
}

.document-studio-wrap {
  width: min(1480px, calc(100% - 40px));
  margin: auto;
}

.document-studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(1.5rem, 4vw, 5rem);
  align-items: end;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.document-studio-hero-copy {
  position: relative;
  max-width: 960px;
}

.document-studio-kicker,
.document-panel-heading > span,
.document-proof-toolbar > div:first-child > span {
  color: var(--doc-gold);
  font: 700 .64rem/1.3 Inter, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.document-studio-title {
  max-width: 15ch;
  margin: .35rem 0 .65rem;
  font: 500 clamp(2.7rem, 5.8vw, 5.7rem)/.88 DocCinzel, serif;
  letter-spacing: -.052em;
  text-wrap: balance;
}

.document-studio-lead {
  max-width: 58rem;
  margin: 0;
  color: rgba(241, 234, 219, .72);
  font: 400 clamp(.96rem, 1.25vw, 1.15rem)/1.62 DocSerif, serif;
}

.document-hero-badges,
.document-proof-quality {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .9rem;
}

.document-hero-badges span,
.document-proof-quality span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 .7rem;
  border: 1px solid rgba(210, 175, 104, .2);
  border-radius: 999px;
  background: rgba(210, 175, 104, .055);
  color: rgba(241, 234, 219, .72);
  font: 650 .56rem/1 Inter, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.document-studio-note {
  display: grid;
  gap: .45rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--doc-line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012));
  color: var(--doc-muted);
  font: 400 .82rem/1.55 Inter, sans-serif;
}

.document-studio-note strong {
  color: var(--doc-gold-bright);
  font-size: .63rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.document-view-switch {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  padding: .35rem;
  border: 1px solid var(--doc-line);
  border-radius: 16px;
  background: rgba(7, 6, 4, .92);
}

.document-view-switch button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--doc-muted);
  font: 700 .63rem/1 Inter, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.document-view-switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, #b88f45, #e0c586);
  color: #171108;
  box-shadow: 0 12px 30px rgba(201, 168, 95, .18);
}

.document-studio-grid,
.document-public-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}

.document-control-panel,
.document-public-card {
  position: sticky;
  top: 88px;
  display: grid;
  gap: .9rem;
  max-height: calc(100svh - 108px);
  overflow: auto;
  padding: clamp(1rem, 1.6vw, 1.35rem);
  border: 1px solid var(--doc-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(210, 175, 104, .09), transparent 17rem),
    linear-gradient(145deg, rgba(24, 20, 14, .97), rgba(8, 7, 5, .985));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .44);
  scrollbar-color: rgba(210, 175, 104, .38) transparent;
  scrollbar-width: thin;
}

.document-panel-heading {
  display: grid;
  gap: .35rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(210, 175, 104, .14);
}

.document-panel-heading h2,
.document-control-panel h2,
.document-public-card h2 {
  margin: 0;
  font: 500 clamp(1.65rem, 2.3vw, 2.35rem)/1 DocCinzel, serif;
}

.document-panel-heading p,
.document-public-card > p,
.document-panel > p {
  margin: 0;
  color: var(--doc-muted);
  font-size: .82rem;
  line-height: 1.55;
}

.document-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
  padding: .32rem;
  border: 1px solid rgba(210, 175, 104, .14);
  border-radius: 15px;
  background: rgba(0, 0, 0, .2);
}

.document-tab {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(241, 234, 219, .58);
  font: 700 .61rem/1 Inter, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.document-tab[aria-selected="true"] {
  background: rgba(210, 175, 104, .14);
  color: #fff4db;
  box-shadow: inset 0 0 0 1px rgba(210, 175, 104, .32), 0 10px 26px rgba(0, 0, 0, .18);
}

.document-fieldset,
.document-panel {
  display: grid;
  gap: .8rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.document-fieldset[hidden],
.document-panel[hidden] {
  display: none;
}

.document-field {
  display: grid;
  gap: .4rem;
}

.document-field > span,
.document-visual-select-label > span {
  color: rgba(241, 234, 219, .62);
  font: 700 .59rem/1.25 Inter, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.document-field input,
.document-field select,
.document-field textarea,
.document-share-result input {
  width: 100%;
  min-height: 46px;
  padding: .7rem .78rem;
  border: 1px solid rgba(210, 175, 104, .2);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, .035);
  color: #f1eadb;
  font: 500 .9rem/1.4 Inter, sans-serif;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.document-range-field span {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
}

.document-range-field output {
  color: var(--doc-gold-bright);
  font-weight: 800;
  letter-spacing: .04em;
}

.document-field input[type="range"] {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--doc-gold-bright);
  cursor: pointer;
}

.document-field input:hover,
.document-field select:hover,
.document-field textarea:hover {
  border-color: rgba(210, 175, 104, .38);
}

.document-field input:focus-visible,
.document-field select:focus-visible,
.document-field textarea:focus-visible,
.document-action:focus-visible,
.document-tab:focus-visible,
.document-proof-actions button:focus-visible,
.document-view-switch button:focus-visible,
.document-visual-option:focus-visible {
  border-color: var(--doc-gold-bright);
  box-shadow: 0 0 0 3px rgba(210, 175, 104, .18);
}

.document-field textarea {
  min-height: 168px;
  resize: vertical;
  background:
    repeating-linear-gradient(transparent 0 31px, rgba(210, 175, 104, .12) 31px 32px),
    rgba(255, 255, 255, .035);
  font-family: DocTypewriter, monospace;
  line-height: 2;
}

.document-field textarea[aria-invalid="true"] {
  border-color: rgba(224, 112, 86, .72);
  box-shadow: 0 0 0 3px rgba(224, 112, 86, .1);
}

.document-field select option {
  background: #11100d;
  color: #f1eadb;
}

.document-inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.document-layout-control-panel {
  padding: .9rem;
  border: 1px solid rgba(210, 175, 104, .16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(210, 175, 104, .075), rgba(255, 255, 255, .025)),
    rgba(0, 0, 0, .16);
}

.document-layout-number-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-layout-number-grid input {
  padding-inline: .55rem;
  text-align: center;
}

.document-layout-snap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.document-layout-snap-grid .document-action {
  min-height: 38px;
  padding-inline: .45rem;
  font-size: .54rem;
}

.document-actions.compact {
  padding-top: 0;
}

.document-preset-tools {
  display: grid;
  gap: .65rem;
  padding: .75rem;
  border: 1px solid rgba(210, 175, 104, .12);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(210, 175, 104, .06), rgba(255, 255, 255, .018)),
    rgba(0, 0, 0, .12);
}

.document-preset-tools .document-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.document-action.file-action {
  position: relative;
  cursor: pointer;
}

.document-action.file-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.document-layout-hint {
  margin: -.2rem 0 0;
  color: rgba(241, 234, 219, .48);
  font: 600 .68rem/1.45 Inter, sans-serif;
}

.document-editor-toolbar,
.document-layer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
}

.document-editor-toolbar {
  margin-bottom: .65rem;
}

.document-layer-panel,
.document-preflight-panel {
  padding: .85rem;
  border: 1px solid rgba(210, 175, 104, .14);
  border-radius: 18px;
  background: rgba(0, 0, 0, .14);
}

.document-panel-heading.mini {
  margin-bottom: .65rem;
}

.document-panel-heading.mini h3 {
  margin: .12rem 0 0;
  color: #f6dfaa;
  font: 700 .85rem/1.2 Inter, sans-serif;
}

.document-layer-list {
  display: grid;
  gap: .38rem;
  max-height: 260px;
  margin-bottom: .7rem;
  overflow: auto;
  padding-right: .18rem;
}

.document-layer-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: .55rem .65rem;
  border: 1px solid rgba(210, 175, 104, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: rgba(241, 234, 219, .82);
  cursor: pointer;
  text-align: left;
}

.document-layer-item span {
  overflow: hidden;
  font: 750 .68rem/1.2 Inter, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-layer-item small {
  color: rgba(241, 234, 219, .45);
  font: 700 .52rem/1 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.document-layer-item.is-selected {
  border-color: rgba(239, 213, 155, .62);
  background: linear-gradient(135deg, rgba(210, 175, 104, .18), rgba(255, 255, 255, .045));
  color: #fff4d1;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 12px 28px rgba(0, 0, 0, .22);
}

.document-layer-item.is-hidden {
  opacity: .56;
}

.document-layer-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-layer-actions .document-action {
  min-height: 36px;
  padding-inline: .45rem;
  font-size: .52rem;
}

.document-action.danger {
  border-color: rgba(224, 112, 86, .4);
  color: #ffb8a5;
}

.document-preflight-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .65rem;
  color: rgba(241, 234, 219, .48);
  font: 800 .58rem/1 Inter, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.document-preflight-heading strong {
  padding: .34rem .55rem;
  border: 1px solid rgba(210, 175, 104, .2);
  border-radius: 999px;
  color: #f4dfab;
}

.document-preflight-heading strong[data-preflight-score="critical"] {
  border-color: rgba(224, 112, 86, .5);
  color: #ffc1ae;
}

.document-preflight-heading strong[data-preflight-score="warning"] {
  border-color: rgba(238, 196, 110, .45);
  color: #ffe0a2;
}

.document-preflight-list {
  display: grid;
  gap: .45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-preflight-list li {
  padding: .55rem .65rem;
  border: 1px solid rgba(210, 175, 104, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: rgba(241, 234, 219, .72);
  font: 650 .64rem/1.35 Inter, sans-serif;
}

.document-preflight-list li[data-preflight-level="critical"] {
  border-color: rgba(224, 112, 86, .38);
  background: rgba(116, 34, 18, .18);
  color: #ffd0c4;
}

.document-preflight-list li[data-preflight-level="warning"] {
  border-color: rgba(238, 196, 110, .28);
  background: rgba(210, 175, 104, .08);
  color: #f8dfa8;
}

.document-print-preflight {
  position: absolute;
  z-index: 45;
  top: 5.35rem;
  right: .85rem;
  width: min(230px, calc(100% - 1.7rem));
  display: grid;
  gap: .5rem;
  padding: .85rem;
  border: 1px solid rgba(239, 213, 155, .28);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
    rgba(8, 7, 5, .88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.document-print-preflight-kicker {
  color: rgba(239, 213, 155, .68);
  font: 850 .55rem/1 Inter, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.document-print-preflight strong {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: #fff0c2;
  font: 850 .95rem/1.1 Inter, sans-serif;
}

.document-print-preflight strong::before {
  content: "";
  width: .64rem;
  height: .64rem;
  border-radius: 999px;
  background: #8df0b7;
  box-shadow: 0 0 18px rgba(141, 240, 183, .45);
}

.document-print-preflight strong[data-print-preflight-score="warning"]::before {
  background: #f2ca75;
  box-shadow: 0 0 18px rgba(242, 202, 117, .45);
}

.document-print-preflight strong[data-print-preflight-score="critical"]::before {
  background: #ff9a7d;
  box-shadow: 0 0 18px rgba(255, 154, 125, .45);
}

.document-print-preflight p {
  margin: 0;
  color: rgba(241, 234, 219, .62);
  font: 650 .68rem/1.45 Inter, sans-serif;
}

.document-print-preflight ul {
  display: grid;
  gap: .35rem;
  margin: .15rem 0 0;
  padding: 0;
  list-style: none;
}

.document-print-preflight li {
  padding: .42rem .48rem;
  border: 1px solid rgba(210, 175, 104, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
  color: rgba(241, 234, 219, .7);
  font: 700 .58rem/1.32 Inter, sans-serif;
}

.document-print-preflight li[data-preflight-level="critical"] {
  border-color: rgba(224, 112, 86, .42);
  color: #ffd0c4;
}

.document-print-preflight li[data-preflight-level="warning"] {
  border-color: rgba(238, 196, 110, .32);
  color: #ffe0a2;
}

.document-visual-select-label {
  display: grid;
  gap: .35rem;
}

.document-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.document-visual-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: -.35rem;
}

.document-visual-option {
  position: relative;
  min-height: 88px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(210, 175, 104, .18);
  border-radius: 13px;
  background: #15110c center/cover no-repeat;
  color: #fff4da;
  cursor: pointer;
  isolation: isolate;
}

.document-visual-option::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 18%, rgba(0, 0, 0, .84));
}

.document-visual-option span {
  position: absolute;
  inset: auto .55rem .5rem;
  font: 700 .54rem/1.2 Inter, sans-serif;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.document-visual-option[aria-pressed="true"] {
  border-color: var(--doc-gold-bright);
  box-shadow: inset 0 0 0 2px rgba(210, 175, 104, .2), 0 10px 28px rgba(0, 0, 0, .28);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  padding-top: .25rem;
}

.document-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .95rem;
  border: 1px solid rgba(210, 175, 104, .3);
  border-radius: 999px;
  background: rgba(210, 175, 104, .08);
  color: #f8eed9;
  font: 700 .62rem/1 Inter, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.document-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(210, 175, 104, .14);
}

.document-action.primary {
  background: linear-gradient(135deg, #b88f45, #e6cc8f);
  color: #171108;
  border-color: transparent;
  box-shadow: 0 15px 34px rgba(201, 168, 95, .18);
}

.document-action:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.document-export-proof {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 20%, rgba(210, 175, 104, .16), transparent 32rem),
    rgba(0, 0, 0, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.document-export-proof[hidden] {
  display: none;
}

.document-export-proof-card {
  width: min(960px, 100%);
  max-height: min(92svh, 920px);
  display: grid;
  grid-template-columns: minmax(240px, .48fr) minmax(0, .52fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
  align-items: center;
  padding: clamp(1rem, 2vw, 1.35rem);
  border: 1px solid rgba(239, 213, 155, .28);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .018)),
    #090704;
  box-shadow: 0 38px 100px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.document-export-proof-copy {
  display: grid;
  gap: .55rem;
  align-self: stretch;
  align-content: center;
}

.document-export-proof-copy span {
  color: var(--doc-gold);
  font: 800 .62rem/1 Inter, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.document-export-proof-copy h2 {
  margin: 0;
  color: #fff1ca;
  font: 600 clamp(1.65rem, 4vw, 3rem)/1 DocCinzel, serif;
  letter-spacing: -.04em;
}

.document-export-proof-copy p {
  margin: 0;
  color: rgba(241, 234, 219, .68);
  font: 400 .92rem/1.65 DocSerif, serif;
}

.document-export-proof img {
  width: 100%;
  max-height: 70svh;
  object-fit: contain;
  border: 1px solid rgba(210, 175, 104, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .42);
}

.document-export-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.document-mobile-inspector {
  display: none;
}

.document-mobile-inspector button {
  min-height: 42px;
  border: 1px solid rgba(210, 175, 104, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  color: rgba(241, 234, 219, .86);
  font: 800 .58rem/1 Inter, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.document-mobile-inspector button:focus-visible {
  outline: 2px solid var(--doc-gold-bright);
  outline-offset: 2px;
}

.document-status {
  min-height: 1.35em;
  margin: 0;
  color: rgba(224, 197, 134, .9);
  font-size: .78rem;
  line-height: 1.45;
}

body.document-exporting .document-status::before {
  content: "";
  display: inline-block;
  width: .7rem;
  height: .7rem;
  margin-right: .5rem;
  border: 1px solid rgba(224, 197, 134, .3);
  border-top-color: var(--doc-gold-bright);
  border-radius: 50%;
  animation: document-spin .7s linear infinite;
}

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

.document-share-result {
  display: grid;
  gap: .55rem;
  padding: .85rem;
  border: 1px solid rgba(210, 175, 104, .2);
  border-radius: 15px;
  background: rgba(0, 0, 0, .23);
}

.document-share-result[hidden] {
  display: none;
}

.document-share-result strong {
  color: var(--doc-gold-bright);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.document-share-result input {
  background: #080705;
  color: #dbc895;
  font-size: .72rem;
}

.document-proof-shell {
  position: sticky;
  top: 88px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(210, 175, 104, .16);
  border-radius: 26px;
  background: #090806;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42);
}

.document-proof-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(210, 175, 104, .13), transparent 16%, transparent 84%, rgba(210, 175, 104, .08)),
    radial-gradient(circle at 86% 18%, rgba(239, 213, 155, .1), transparent 18rem);
}

.document-proof-toolbar,
.document-proof-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .9rem;
  border-bottom: 1px solid rgba(210, 175, 104, .13);
  background: rgba(12, 10, 7, .95);
}

.document-proof-toolbar > div:first-child {
  display: grid;
  gap: .15rem;
}

.document-proof-toolbar strong {
  color: #f2e7cf;
  font: 500 1rem/1.2 DocCinzel, serif;
}

.document-proof-toolbar .document-proof-quality {
  margin: 0;
}

.document-proof-actions {
  display: flex;
  gap: .35rem;
}

.document-proof-actions button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 .62rem;
  border: 1px solid rgba(210, 175, 104, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
  color: rgba(241, 234, 219, .78);
  font: 700 .6rem/1 Inter, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.document-preview-stage {
  --proof-zoom: 1;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: clamp(500px, 66svh, 680px);
  padding: clamp(1.1rem, 3vw, 2.5rem) clamp(1.1rem, 3vw, 2.5rem);
  overflow: auto;
  background:
    radial-gradient(circle at 50% 24%, rgba(210, 175, 104, .1), transparent 26rem),
    linear-gradient(90deg, transparent 49.9%, rgba(255, 255, 255, .025) 50%, transparent 50.1%),
    linear-gradient(transparent 49.9%, rgba(255, 255, 255, .025) 50%, transparent 50.1%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 48px),
    #080705;
}

body[data-document-mode="admin"] .document-preview-stage {
  padding-right: clamp(13.5rem, 22vw, 17rem);
}

.document-preview-stage::before,
.document-preview-stage::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.document-preview-stage::before {
  top: 18px;
  left: 18px;
  border-top: 1px solid rgba(210, 175, 104, .34);
  border-left: 1px solid rgba(210, 175, 104, .34);
}

.document-preview-stage::after {
  right: 18px;
  bottom: 18px;
  border-right: 1px solid rgba(210, 175, 104, .34);
  border-bottom: 1px solid rgba(210, 175, 104, .34);
}

.document-sheet {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  overflow: hidden;
  width: min(100%, 980px);
  aspect-ratio: 1.414 / 1;
  border: 1px solid rgba(225, 207, 165, .25);
  background-color: #17130d;
  background-image: var(--document-background);
  background-position: center;
  background-size: cover;
  box-shadow: 0 45px 110px rgba(0, 0, 0, .68), 0 0 0 1px rgba(255, 255, 255, .025);
  color: #f6e9c8;
  transform: scale(var(--proof-zoom));
  transition: transform 220ms cubic-bezier(.2, .7, .2, 1), opacity 180ms ease;
  text-rendering: geometricPrecision;
}

.document-sheet.report {
  width: min(100%, 390px);
  aspect-ratio: 1 / 1.414;
  color: var(--doc-ink);
  background-color: var(--doc-paper);
}

.document-proof-shell:fullscreen .document-sheet.report,
.document-proof-shell.is-proof-open .document-sheet.report {
  width: min(70vh, 700px);
}

.document-sheet::before,
.document-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.document-sheet::before {
  z-index: 1;
  background: url("/public/assets/reports/report-paper-texture.jpg") center / cover;
  opacity: .16;
  mix-blend-mode: soft-light;
}

.document-sheet.report::before {
  opacity: .24;
  mix-blend-mode: multiply;
}

.document-sheet::after {
  z-index: 5;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .34);
  mix-blend-mode: multiply;
}

.document-editor-grid {
  position: absolute;
  z-index: 920;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body[data-document-mode="admin"] .document-editor-grid {
  opacity: .96;
}

body[data-proof-grid="off"] .document-editor-grid,
body[data-document-mode="public"] .document-editor-grid {
  opacity: 0;
}

.document-print-desk-overlay > span {
  position: absolute;
  pointer-events: none;
}

.document-print-bleed {
  inset: 2%;
  border: 1px dashed rgba(255, 217, 139, .58);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .22);
}

.document-print-safe {
  inset: 7%;
  border: 1px solid rgba(239, 213, 155, .82);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(239, 213, 155, .42) 50%, transparent calc(50% + .5px)),
    linear-gradient(transparent calc(50% - .5px), rgba(239, 213, 155, .42) 50%, transparent calc(50% + .5px));
  box-shadow:
    0 0 0 1px rgba(7, 6, 4, .35),
    inset 0 0 0 1px rgba(7, 6, 4, .22),
    0 0 24px rgba(239, 213, 155, .13);
}

.document-print-thirds {
  inset: 7%;
  background:
    linear-gradient(90deg, transparent 33.2%, rgba(239, 213, 155, .36) 33.3%, transparent 33.45%, transparent 66.55%, rgba(239, 213, 155, .36) 66.7%, transparent 66.8%),
    linear-gradient(transparent 33.2%, rgba(239, 213, 155, .36) 33.3%, transparent 33.45%, transparent 66.55%, rgba(239, 213, 155, .36) 66.7%, transparent 66.8%);
  opacity: 0;
}

.document-print-baseline {
  inset: 7%;
  background:
    repeating-linear-gradient(rgba(239, 213, 155, .24) 0 1px, transparent 1px 4%),
    repeating-linear-gradient(90deg, rgba(239, 213, 155, .13) 0 1px, transparent 1px 5%);
  opacity: 0;
  mix-blend-mode: screen;
}

.document-print-center {
  background: rgba(239, 213, 155, .56);
  opacity: .64;
}

.document-print-center.is-x {
  top: 0;
  bottom: 0;
  left: calc(50% - .5px);
  width: 1px;
}

.document-print-center.is-y {
  right: 0;
  left: 0;
  top: calc(50% - .5px);
  height: 1px;
}

.document-print-snap-guide {
  z-index: 930;
  display: block;
  background: linear-gradient(rgba(255, 243, 198, .15), #fff2bf, rgba(255, 243, 198, .15));
  box-shadow: 0 0 0 1px rgba(7, 6, 4, .28), 0 0 18px rgba(239, 213, 155, .65);
}

.document-print-snap-guide[hidden] {
  display: none;
}

.document-print-snap-guide.is-x {
  top: 0;
  bottom: 0;
  width: 1px;
}

.document-print-snap-guide.is-y {
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 243, 198, .15), #fff2bf, rgba(255, 243, 198, .15));
}

.document-print-snap-guide::after {
  content: attr(data-guide-label);
  position: absolute;
  padding: .28rem .38rem;
  border: 1px solid rgba(239, 213, 155, .42);
  border-radius: 999px;
  background: rgba(9, 7, 4, .88);
  color: #ffe6a3;
  font: 800 .46rem/1 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-print-snap-guide.is-x::after {
  top: .5rem;
  left: .35rem;
}

.document-print-snap-guide.is-y::after {
  top: .35rem;
  right: .5rem;
}

.document-print-desk-label {
  z-index: 2;
  padding: .2rem .35rem;
  border: 1px solid rgba(239, 213, 155, .26);
  border-radius: 999px;
  background: rgba(7, 6, 4, .68);
  color: rgba(255, 230, 163, .78);
  font: 800 .43rem/1 Inter, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.document-print-desk-label.is-bleed {
  top: 2%;
  left: 2%;
  transform: translate(.35rem, .35rem);
}

.document-print-desk-label.is-safe {
  top: 7%;
  right: 7%;
  transform: translate(-.35rem, .35rem);
}

body[data-proof-grid="safe"] .document-print-thirds,
body[data-proof-grid="safe"] .document-print-baseline {
  display: none;
}

body[data-proof-grid="thirds"] .document-print-thirds {
  opacity: 1;
}

body[data-proof-grid="thirds"] .document-print-baseline {
  display: none;
}

body[data-proof-grid="print"] .document-print-thirds,
body[data-proof-grid="print"] .document-print-baseline {
  opacity: 1;
}

.document-sheet-inner {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-align: center;
}

.document-sheet.report .document-sheet-inner {
  inset: 0;
  text-align: left;
}

.document-sheet [data-layout-fragment] {
  box-sizing: border-box;
  right: auto;
  bottom: auto;
  max-width: none;
  transform: none;
  text-align: var(--fragment-text-align, center);
  object-position: var(--fragment-object-position, center center);
}

.document-sheet [data-layout-fragment]:not(img) {
  align-content: var(--fragment-align-content, center);
}

.document-sheet-title,
.document-sheet-copy,
.certificate-name-lockup,
.certificate-closing,
.document-mark,
.report-document-number,
.report-title-text,
.report-quote,
.report-copy,
.report-entry,
.report-signature-row {
  display: grid;
}

.certificate-name-lockup[data-fragment-align="left"] .document-sheet-name {
  justify-self: start;
}

.certificate-name-lockup[data-fragment-align="center"] .document-sheet-name {
  justify-self: center;
}

.certificate-name-lockup[data-fragment-align="right"] .document-sheet-name {
  justify-self: end;
}

body[data-document-mode="admin"] .document-sheet [data-layout-fragment] {
  cursor: grab;
  outline: 1px solid rgba(239, 213, 155, 0);
  outline-offset: 3px;
  transition: outline-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

body[data-document-mode="admin"] .document-sheet [data-layout-fragment]:hover,
body[data-document-mode="admin"] .document-sheet [data-layout-fragment].is-layout-selected {
  outline-color: rgba(239, 213, 155, .72);
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0), 0 0 22px rgba(239, 213, 155, .18);
}

body[data-document-mode="admin"] .document-sheet [data-layout-fragment].is-layout-selected {
  background: rgba(239, 213, 155, .055);
}

body[data-document-mode="admin"] .document-sheet [data-layout-fragment].is-layout-dragging {
  cursor: grabbing;
  outline-color: var(--doc-gold-bright);
  box-shadow: 0 0 0 1px rgba(8, 6, 3, .5), 0 0 30px rgba(239, 213, 155, .28);
}

body[data-document-mode="admin"] .document-sheet [data-layout-fragment][data-fragment-locked="true"] {
  cursor: not-allowed;
}

.document-fragment-resize-box {
  position: absolute;
  box-sizing: border-box;
  border: 1px solid rgba(255, 229, 166, .98);
  border-radius: 6px;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(7, 6, 4, .65),
    0 0 26px rgba(239, 213, 155, .34),
    inset 0 0 0 1px rgba(7, 6, 4, .18);
}

.document-fragment-resize-box::before,
.document-fragment-resize-box::after {
  position: absolute;
  left: 0;
  transform: translateY(calc(-100% - .42rem));
  border: 1px solid rgba(239, 213, 155, .36);
  background: rgba(7, 6, 4, .88);
  color: #ffe7ab;
  white-space: nowrap;
  pointer-events: none;
}

.document-fragment-resize-box::before {
  content: attr(data-fragment-label);
  top: 0;
  padding: .28rem .42rem;
  border-radius: 999px;
  font: 850 .5rem/1 Inter, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.document-fragment-resize-box::after {
  content: attr(data-fragment-size);
  top: 1.25rem;
  padding: .2rem .34rem;
  border-radius: 8px;
  color: rgba(241, 234, 219, .68);
  font: 750 .46rem/1 Inter, sans-serif;
}

.document-fragment-resize-box[data-locked="true"] {
  border-style: dashed;
  border-color: rgba(241, 234, 219, .42);
  box-shadow: 0 0 0 1px rgba(7, 6, 4, .5);
}

.document-resize-handle {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(7, 6, 4, .86);
  border-radius: 4px;
  background: linear-gradient(135deg, #fff1b9, #c89439);
  pointer-events: auto;
  box-shadow: 0 0 0 1px rgba(239, 213, 155, .32), 0 4px 14px rgba(0, 0, 0, .42), 0 0 16px rgba(239, 213, 155, .26);
}

.document-resize-handle:hover {
  background: linear-gradient(135deg, #fff9dc, #e0b75f);
  box-shadow: 0 0 0 1px rgba(255, 238, 185, .58), 0 6px 18px rgba(0, 0, 0, .5), 0 0 22px rgba(239, 213, 155, .42);
}

.document-fragment-resize-box[data-locked="true"] .document-resize-handle {
  display: none;
}

.handle-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.handle-n { top: -7px; left: calc(50% - 6.5px); cursor: ns-resize; }
.handle-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.handle-e { top: calc(50% - 6.5px); right: -7px; cursor: ew-resize; }
.handle-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.handle-s { bottom: -7px; left: calc(50% - 6.5px); cursor: ns-resize; }
.handle-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.handle-w { top: calc(50% - 6.5px); left: -7px; cursor: ew-resize; }

.document-mark {
  position: absolute;
  top: 1.5%;
  left: 12%;
  right: 12%;
  overflow: hidden;
  color: rgba(224, 197, 134, .84);
  font: 700 clamp(.46rem, .8vw, .68rem)/1 Inter, sans-serif;
  letter-spacing: .18em;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-sheet.report .document-mark {
  color: #695634;
}

.document-sheet-title {
  position: absolute;
  top: var(--cert-title-top, 24%);
  left: 5%;
  right: 5%;
  margin: 0;
  font-family: DocCinzel, serif;
  font-size: calc(clamp(1.35rem, 3.1vw, 3.75rem) * var(--cert-title-scale, 1));
  font-weight: 600;
  line-height: .9;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: transparent;
  mix-blend-mode: normal;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-shadow:
    0 1px 0 rgba(255, 245, 211, .46),
    0 3px 0 rgba(78, 52, 17, .62),
    0 10px 28px rgba(0, 0, 0, .55);
}

.document-sheet-title.is-graphic-title {
  color: transparent;
  overflow: visible;
  text-shadow: none;
}

.document-title-graphic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transform: scale(var(--cert-title-scale, 1));
  transform-origin: center;
  filter:
    drop-shadow(0 .16rem .05rem rgba(60, 39, 12, .42))
    drop-shadow(0 .72rem 1.25rem rgba(0, 0, 0, .38))
    drop-shadow(0 -.03rem .04rem rgba(255, 244, 205, .28));
}

.certificate-top-meta {
  position: absolute;
  top: var(--cert-meta-top, 7%);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22%;
  text-align: left;
}

.certificate-top-meta > span {
  min-width: 0;
}

.certificate-top-meta > span:last-child {
  text-align: right;
}

.certificate-top-meta small,
.certificate-top-meta strong {
  display: block;
}

.certificate-top-meta small {
  margin-bottom: 3%;
  color: rgba(224, 197, 134, .84);
  font: 700 clamp(.3rem, .54vw, .52rem)/1 Inter, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.certificate-top-meta strong {
  overflow: hidden;
  padding-bottom: 4%;
  background: linear-gradient(90deg, rgba(113, 75, 27, .22), #edce86 18%, #aa7430 50%, #edce86 82%, rgba(113, 75, 27, .22)) bottom / 100% 1px no-repeat;
  color: #f7e9c4;
  font: 500 clamp(.38rem, .72vw, .68rem)/1.2 DocSerif, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-name-lockup {
  position: absolute;
  top: var(--cert-name-top, 65.5%);
  left: 50%;
  max-width: 70%;
  transform: translateX(-50%);
}

.document-sheet-name {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 .55em .23em;
  color: #fff7dd;
  font-family: DocSignature, serif;
  font-size: calc(clamp(1.2rem, 3vw, 3.5rem) * var(--cert-name-scale, 1));
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 .5rem 1.8rem rgba(0, 0, 0, .42);
  white-space: nowrap;
}

.document-sheet-name::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(113, 75, 27, .2), #f1d692 18%, #ae7933 50%, #f1d692 82%, rgba(113, 75, 27, .2));
  box-shadow: 0 2px 7px rgba(216, 172, 82, .26);
}

.document-sheet-copy {
  position: absolute;
  top: var(--cert-copy-top, 39%);
  left: 13%;
  right: 13%;
  margin: 0;
  color: rgba(246, 233, 200, .78);
  font-family: DocSerif, serif;
  font-size: calc(clamp(.45rem, .85vw, .8rem) * var(--cert-body-scale, 1));
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-line;
}

.certificate-closing {
  position: absolute;
  top: var(--cert-closing-top, 78%);
  left: 20%;
  right: 20%;
  margin: 0;
  color: rgba(246, 233, 200, .7);
  font-family: DocSerif, serif;
  font-size: calc(clamp(.38rem, .7vw, .66rem) * var(--cert-body-scale, 1));
  font-weight: 400;
  line-height: 1.45;
}

.document-author-signature {
  position: absolute;
  left: 39%;
  bottom: var(--cert-author-bottom, 6.5%);
  width: 22%;
  max-height: 10%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .24));
  z-index: 4;
}

.document-stamp {
  position: absolute;
  top: var(--cert-stamp-top, 17%);
  left: var(--cert-stamp-left, 46.75%);
  width: var(--cert-stamp-width, 6.5%);
  aspect-ratio: 1;
  object-fit: contain;
  z-index: 4;
  opacity: .9;
  transform: rotate(-1.4deg) translateZ(0);
  filter:
    drop-shadow(7px 10px 10px rgba(0, 0, 0, .52))
    drop-shadow(-2px -2px 2px rgba(255, 255, 255, .35));
}

.document-sheet.report .document-stamp {
  top: auto;
  right: auto;
  bottom: var(--report-stamp-bottom, 8%);
  left: 8%;
  width: 18%;
  opacity: .76;
  filter:
    drop-shadow(6px 8px 8px rgba(54, 35, 16, .42))
    drop-shadow(-2px -2px 2px rgba(255, 255, 255, .62));
}

.document-action.share {
  position: relative;
  overflow: hidden;
  border-color: rgba(239, 213, 155, .42);
  background: linear-gradient(135deg, rgba(210, 175, 104, .16), rgba(210, 175, 104, .045));
  color: var(--doc-gold-bright);
}

.document-action.share::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 22%, rgba(255, 244, 210, .18) 48%, transparent 72%);
  transform: translateX(-120%);
  transition: transform 520ms cubic-bezier(.2, .7, .2, 1);
}

.document-action.share:hover::before,
.document-action.share:focus-visible::before {
  transform: translateX(120%);
}

.report-topline {
  position: absolute;
  top: 5%;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15%;
  font: 700 clamp(.34rem, .6vw, .54rem)/1.15 DocTypewriter, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-topline > span:last-child {
  text-align: right;
}

.report-topline small,
.report-topline strong {
  display: block;
}

.report-topline small {
  margin-bottom: 5%;
  opacity: .72;
}

.report-topline strong {
  overflow: hidden;
  padding-bottom: 5%;
  border-bottom: 1px solid rgba(28, 22, 16, .85);
  font-size: 1.15em;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-document-number {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  overflow: hidden;
  font: 700 clamp(.31rem, .52vw, .48rem)/1 DocTypewriter, monospace;
  letter-spacing: .035em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-title-text {
  position: absolute;
  top: var(--report-title-top, 13.2%);
  left: 8%;
  right: 8%;
  margin: 0;
  color: #292117;
  overflow: hidden;
  font-family: DocTypewriter, monospace;
  font-size: calc(clamp(1rem, 6.2cqw, 2.4rem) * var(--report-title-scale, 1));
  font-weight: 700;
  line-height: 1;
  letter-spacing: .055em;
  text-align: center;
  text-shadow: .7px .7px 0 rgba(58, 43, 26, .3), -.4px -.4px 0 rgba(255, 249, 228, .6);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  mix-blend-mode: multiply;
}

.report-quote {
  position: absolute;
  top: var(--report-quote-top, 22.5%);
  left: 0;
  right: 0;
  margin: 0;
  padding: 2.5% 3%;
  border-left: 3px solid #765d32;
  background: rgba(255, 255, 255, .18);
  font: 700 clamp(.45rem, .82vw, .72rem)/1.5 DocTypewriter, monospace;
}

.report-copy {
  position: absolute;
  top: var(--report-copy-top, 34.5%);
  left: 0;
  right: 0;
  margin: 0;
  font: 500 clamp(.42rem, .76vw, .66rem)/1.55 DocTypewriter, monospace;
}

.report-lines {
  position: absolute;
  top: var(--report-lines-top, 44%);
  left: 0;
  right: 0;
  height: var(--report-lines-height, 33.5%);
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  border-top: 1px solid rgba(66, 50, 29, .28);
}

.report-lines span {
  border-bottom: 1px solid rgba(66, 50, 29, .34);
}

.report-entry {
  position: absolute;
  left: 9%;
  right: 9%;
  top: var(--report-entry-top, 45.5%);
  z-index: 3;
  max-height: 31%;
  overflow: hidden;
  color: #282016;
  font-family: DocTypewriter, monospace;
  font-size: calc(clamp(.5rem, .9vw, .78rem) * var(--report-text-scale, 1));
  font-weight: 500;
  line-height: 2.12;
  white-space: pre-wrap;
}

.report-signature-row {
  position: absolute;
  right: 0;
  bottom: var(--report-signature-bottom, 4.8%);
  width: 46%;
  display: grid;
  align-content: var(--fragment-align-content, end);
  gap: 5px;
  font: 700 clamp(.39rem, .7vw, .6rem)/1.4 DocTypewriter, monospace;
  text-align: right;
  text-transform: uppercase;
}

.report-signature-row[data-fragment-align="left"] {
  justify-items: start;
}

.report-signature-row[data-fragment-align="center"] {
  justify-items: center;
}

.report-signature-row[data-fragment-align="right"] {
  justify-items: end;
}

.report-signature-row span {
  order: 2;
}

.report-signature-row strong {
  order: 1;
  max-width: 100%;
  overflow: hidden;
  padding-bottom: 3%;
  border-bottom: 1px solid rgba(28, 22, 16, .82);
  font-size: 1.2em;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-proof-footer {
  border-top: 1px solid rgba(210, 175, 104, .12);
  border-bottom: 0;
  color: rgba(241, 234, 219, .42);
  font: 650 .55rem/1.3 Inter, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.document-proof-shell:fullscreen,
.document-proof-shell.is-proof-open {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 0;
  border-radius: 0;
}

.document-proof-shell:fullscreen .document-preview-stage,
.document-proof-shell.is-proof-open .document-preview-stage {
  min-height: 0;
}

.document-privacy {
  color: rgba(241, 234, 219, .5) !important;
  font-size: .74rem !important;
}

.document-report-meter {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -.45rem;
  color: rgba(241, 234, 219, .5);
  font: 650 .59rem/1.4 Inter, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.document-report-meter.is-overflow {
  color: #ec9d86;
}

.typewriter-sound-panel {
  padding: .7rem .8rem !important;
  border-radius: 13px !important;
}

.typewriter-sound-panel summary {
  color: var(--doc-gold-bright);
  font: 700 .61rem/1.4 Inter, sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
  text-transform: uppercase;
}

.typewriter-sound-panel[open] summary {
  margin-bottom: .65rem;
}

.typewriter-sound-panel .vh-button {
  min-height: 38px;
  padding: .45rem .7rem;
  font-size: .58rem;
}

@media (max-width: 1120px) {
  .document-proof-quality {
    display: none;
  }

  body[data-document-mode="admin"] .document-preview-stage {
    padding-right: clamp(11rem, 24vw, 13rem);
  }

  .document-print-preflight {
    width: 190px;
  }

  .document-studio-grid,
  .document-public-layout {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .document-studio-main {
    padding-top: 6rem;
  }

  .document-studio-wrap {
    width: min(100% - 24px, 760px);
  }

  .document-studio-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .document-studio-title {
    max-width: 18ch;
    font-size: clamp(2.45rem, 10vw, 4.8rem);
  }

  .document-studio-note {
    display: none;
  }

  .document-view-switch {
    position: sticky;
    top: 72px;
    z-index: 30;
    display: grid;
    margin-bottom: .8rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  body[data-document-mode="public"] .document-view-switch {
    top: max(10px, env(safe-area-inset-top));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .42);
  }

  .document-studio-grid,
  .document-public-layout {
    grid-template-columns: 1fr;
  }

  .document-control-panel,
  .document-public-card,
  .document-proof-shell {
    position: relative;
    top: auto;
    max-height: none;
  }

  body[data-document-view="edit"] .document-proof-shell,
  body[data-document-view="preview"] .document-control-panel,
  body[data-document-view="preview"] .document-public-card {
    display: none;
  }

  .document-preview-stage {
    min-height: 64svh;
  }

  body[data-document-mode="admin"] .document-preview-stage {
    padding-right: clamp(1.1rem, 3vw, 2.5rem);
  }

  .document-print-preflight {
    display: none;
  }

  body[data-document-mode="public"][data-document-view="edit"] .document-public-card {
    min-height: calc(100svh - 176px);
  }

  body[data-document-mode="admin"][data-document-view="preview"] .document-mobile-inspector {
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    z-index: 90;
    display: grid;
    gap: .55rem;
    max-height: min(44svh, 330px);
    overflow: auto;
    padding: .75rem;
    border: 1px solid rgba(239, 213, 155, .28);
    border-radius: 22px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)),
      rgba(7, 6, 4, .94);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  body[data-document-mode="admin"][data-document-view="preview"] .document-proof-shell {
    padding-bottom: calc(12rem + env(safe-area-inset-bottom));
  }

  .document-mobile-inspector-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .5rem;
    align-items: center;
  }

  .document-mobile-inspector-head span,
  .document-mobile-inspector-head small {
    color: rgba(241, 234, 219, .48);
    font: 800 .55rem/1 Inter, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .document-mobile-inspector-head strong {
    overflow: hidden;
    color: #fff1c7;
    font: 800 .78rem/1.1 Inter, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .document-mobile-inspector-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .4rem;
  }

  .document-mobile-inspector-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .document-studio-main {
    padding-top: 5.6rem;
    padding-bottom: 2.5rem;
  }

  .document-studio-wrap {
    width: min(100% - 18px, 760px);
  }

  .document-studio-hero {
    margin-bottom: 1rem;
  }

  .document-studio-title {
    margin-top: .25rem;
    font-size: clamp(2.25rem, 11vw, 3.5rem);
  }

  .document-studio-lead {
    font-size: .93rem;
    line-height: 1.55;
  }

  .document-hero-badges span:nth-child(2) {
    display: none;
  }

  .document-control-panel,
  .document-public-card {
    padding: .9rem;
    border-radius: 20px;
  }

  body[data-document-mode="public"] .document-public-card {
    padding-bottom: calc(5.6rem + env(safe-area-inset-bottom));
  }

  body[data-document-mode="public"] .document-panel {
    gap: .9rem;
  }

  body[data-document-mode="public"] .document-field input,
  body[data-document-mode="public"] .document-field textarea {
    min-height: 54px;
    font-size: 16px;
  }

  body[data-document-mode="public"] .document-field textarea {
    min-height: min(34svh, 220px);
  }

  .document-inline-fields,
  .document-visual-options {
    grid-template-columns: 1fr;
  }

  .document-visual-option {
    min-height: 72px;
  }

  .document-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-document-mode="public"] .document-panel .document-actions {
    position: sticky;
    z-index: 20;
    bottom: calc(.65rem + env(safe-area-inset-bottom));
    padding: .5rem;
    border: 1px solid rgba(210, 175, 104, .18);
    border-radius: 18px;
    background: rgba(8, 7, 5, .92);
    box-shadow: 0 -18px 44px rgba(0, 0, 0, .42);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .document-action {
    width: 100%;
    min-height: 48px;
  }

  .document-proof-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .document-proof-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 38px 1fr 38px 1.4fr;
  }

  .document-preview-stage {
    min-height: 62svh;
    padding: .55rem;
    place-items: start center;
  }

  body[data-document-type="certificate"] .document-preview-stage {
    min-height: 390px;
  }

  body[data-document-type="report"] .document-preview-stage {
    min-height: 68svh;
  }

  .document-sheet.certificate .document-sheet-copy {
    font-size: clamp(.27rem, 1.35cqw, .5rem);
    line-height: 1.42;
  }

  .document-sheet.certificate .document-sheet-name {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(.66rem, 3.5cqw, 1.2rem);
    text-overflow: ellipsis;
  }

  .document-sheet.certificate .certificate-closing {
    font-size: clamp(.26rem, 1.18cqw, .46rem);
    line-height: 1.38;
  }

  .report-entry {
    left: 9%;
    right: 9%;
  }

  .document-proof-footer span:last-child {
    display: none;
  }

  .document-preset-tools .document-actions {
    grid-template-columns: 1fr;
  }

  .document-export-proof-card {
    grid-template-columns: 1fr;
    max-height: 94svh;
    overflow: auto;
    border-radius: 22px;
  }

  .document-export-proof img {
    max-height: 52svh;
  }

  .document-export-proof-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-document-mode="admin"][data-document-view="preview"] .document-mobile-inspector {
    max-height: min(48svh, 360px);
    padding: .65rem;
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .document-studio-page *,
  .document-studio-page *::before,
  .document-studio-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
