html.hc-modal-open { overflow: hidden; }
.hc-dialog {
  --hc-ink: #271e19;
  --hc-paper: #f7efdf;
  --hc-red: #76252e;
  --hc-gold: #af8b4d;
  box-sizing: border-box;
  inset: 0;
  border: 1px solid var(--hc-gold);
  border-radius: 2px;
  padding: 0;
  margin: auto;
  width: min(550px, calc(100% - 28px));
  max-width: none;
  max-height: min(88dvh, 900px);
  background: var(--hc-paper);
  color: var(--hc-ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 28px 90px #170e0c69;
  font: 16px/1.45 Georgia, 'Times New Roman', serif;
  text-align: left;
  color-scheme: light;
  z-index: 10;
}
.hc-dialog[open] { display: block; }
.hc-dialog::backdrop { background: rgb(22 12 13 / 77%); }
.hc-dialog *, .hc-dialog *::before, .hc-dialog *::after { box-sizing: border-box; }
.hc-dialog [hidden] { display: none !important; }
.hc-dialog button, .hc-dialog select, .hc-dialog textarea { font: inherit; }
.hc-dialog button { cursor: pointer; }
.hc-dialog :is(button, select, textarea):focus-visible { outline: 3px solid #93703a; outline-offset: 3px; }
.hc-bar { display: flex; align-items: center; justify-content: space-between; min-height: 50px; background: #3b151b; color: #f9edcf; padding: 3px 12px 3px 24px; }
.hc-bar > span, .hc-eyebrow, .hc-record dt, .hc-sign > span, .hc-form label, .hc-refile, .hc-status { font-family: ui-monospace, 'Courier New', monospace; }
.hc-bar > span { font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.hc-bar b { margin: 0 5px; color: #d4ae68; }
.hc-dialog .hc-close { display: inline-grid; place-content: center; width: 40px; height: 40px; padding: 0; border: none; border-radius: 0; background: transparent; color: inherit; font: 28px/1 Georgia, serif; }
.hc-dialog .hc-close:hover { background: #ffffff10; }
.hc-interior { margin: 10px; padding: clamp(18px, 5vw, 36px); border: 1px solid #b7a583; background: var(--hc-paper); }
.hc-interior .hc-eyebrow { margin: 0 0 13px; color: var(--hc-red); font-size: 10px; font-weight: 700; line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; }
.hc-interior #hc-title { margin: 0; color: var(--hc-ink); font: 500 clamp(33px, 6vw, 46px)/1.02 Georgia, 'Times New Roman', serif; letter-spacing: -.055em; text-transform: none; }
.hc-interior #hc-title:focus { outline: none; }
.hc-interior .hc-intro { margin: 13px 0 24px; font: 16px/1.5 Georgia, serif; color: #5c4b3d; }
.hc-form { display: grid; gap: 8px; }
.hc-form label { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; color: var(--hc-ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hc-form label small { font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #67584b; }
.hc-form :is(textarea,select) { min-width: 0; width: 100%; padding: 11px 12px; border: 1px solid #ac9676; border-radius: 2px; background: #fffaf0; color: var(--hc-ink); font: 16px/1.4 Georgia, serif; }
.hc-form select { margin-bottom: 12px; }
.hc-form textarea { min-height: 78px; resize: vertical; }
.hc-form textarea::placeholder { color: #71675b; opacity: 1; }
.hc-dialog .hc-primary, .hc-dialog .hc-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 45px;
  border: 1px solid var(--hc-red); border-radius: 2px; background: var(--hc-red); color: #fff4d8;
  padding: 10px 16px; font: 700 12px/1.3 ui-monospace, 'Courier New', monospace; text-transform: uppercase; letter-spacing: .055em;
}
.hc-form .hc-primary { margin-top: 10px; }
.hc-dialog .hc-secondary { color: var(--hc-red); background: transparent; }
.hc-dialog .hc-primary:hover { background: #561b22; }
.hc-dialog .hc-secondary:hover { background: #ebdeca; }
.hc-dialog .hc-primary:disabled { opacity: .55; cursor: wait; }
.hc-dialog:has(.hc-record) { width: min(850px, calc(100% - 28px)); }
.hc-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; margin-top: 24px; }
.hc-proof { min-width: 0; margin: 0; background: #38262a; border: 1px solid #705445; color: #e6c999; }
.hc-proof figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; padding: 9px 12px; border-bottom: 1px solid #715746; font: 700 10px/1.3 ui-monospace, 'Courier New', monospace; text-transform: uppercase; letter-spacing: .08em; }
.hc-proof figcaption span { color: #e2d3be; font-weight: 400; letter-spacing: 0; }
.hc-proof-mat { padding: 12px; }
.hc-proof-mat::before { content: ''; display: block; aspect-ratio: 9 / 10; background: #4b3839; }
.hc-proof-mat:has(img:not([hidden]))::before { display: none; }
.hc-proof-mat img { display: block; width: 100%; height: auto; box-shadow: 0 2px 7px #160b0e6b; }
.hc-review-side { min-width: 0; }
.hc-proof[hidden] + .hc-review-side { grid-column: 1 / -1; }
.hc-review-side .hc-stamp { margin-top: 0; }
.hc-record .hc-stamp {
  display: inline-block; margin: 19px 0 6px; border: 3px double currentColor; padding: 2px 9px 3px;
  color: var(--hc-red); font: 700 24px/1.1 Georgia, serif; letter-spacing: .045em; transform: rotate(-3deg);
}
.hc-record dl { margin: 20px 0; }
.hc-record dt, .hc-sign > span { margin: 0 0 4px; color: var(--hc-red); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hc-record dd { margin: 0; overflow-wrap: anywhere; color: var(--hc-ink); font: 17px/1.4 Georgia, serif; }
.hc-record dd + dt { margin-top: 14px; }
.hc-record .hc-sentence { font-style: italic; }
.hc-sign { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; align-items: baseline; border-block: 1px solid #b7a583; padding: 10px 0; }
.hc-sign > span { margin: 0; color: #67584b; }
.hc-sign > i { color: #452b23; font: italic 18px/1.3 Georgia, serif; }
.hc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.hc-dialog .hc-refile { display: inline-block; border: 0; background: transparent; padding: 11px 0 0; color: var(--hc-red); font: 700 12px/1.4 ui-monospace, 'Courier New', monospace; text-decoration: underline; text-underline-offset: 3px; }
.hc-status { margin: 8px 0 0; font-size: 11px; color: #67584b; }
.hc-status:empty { display: none; }
@media (max-width: 659px) {
  .hc-dialog:has(.hc-record) { width: min(465px, calc(100% - 20px)); }
  .hc-review { grid-template-columns: 1fr; margin-top: 16px; gap: 15px; }
  .hc-review-side { display: flex; flex-direction: column; gap: 24px; }
  .hc-export { order: -1; }
  .hc-export .hc-actions { margin-top: 0; }
  .hc-proof-mat { padding: 7px; }
}
@media (max-width: 420px) {
  .hc-bar { padding-left: 16px; }
  .hc-interior { margin: 7px; padding: 18px; }
  .hc-actions > button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .hc-dialog[open] { animation: hc-arrive 160ms ease-out both; }
  @keyframes hc-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
