:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20252b;
  background: #fff;
  font-synthesis: none;
  --ink: #20252b;
  --muted: #66707c;
  --border: #e2e6eb;
  --soft: #f5f6f8;
  --orange: #f5790a;
  --orange-hover: #df6905;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a.button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .45; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #f5790a66; outline-offset: 3px; }
.icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.shell-header {
  position: relative; z-index: 6; flex-shrink: 0; display: flex; align-items: center; gap: 20px;
  min-height: 80px; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand img { object-fit: contain; }
.brand strong { display: block; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.6px; }
.brand small { display: block; font-size: 12px; line-height: 1.4; margin-top: 3px; color: var(--muted); }
.utilities { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.quiet-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px;
  padding: 8px 10px; border: 0; border-radius: 8px; color: #454e59; background: transparent;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: color .18s, background .18s;
}
.quiet-button:hover { background: var(--soft); color: var(--ink); }
.actions { display: flex; gap: 10px; flex-shrink: 0; padding-left: 20px; border-left: 1px solid var(--border); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px;
  padding: 10px 15px; border: 1px solid transparent; border-radius: 8px; font-size: 13px;
  font-weight: 600; line-height: 1.45; text-decoration: none;
  transition: color .18s, background .18s, border-color .18s, box-shadow .24s, transform .3s var(--ease);
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0) scale(.985); }
.button .icon { width: 19px; height: 19px; transition: transform .3s var(--ease); }
.button:hover:not(:disabled) .icon { transform: translateY(-1px); }
.primary { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 1px 2px #1c27300a; }
.primary:hover:not(:disabled) { background: var(--orange-hover); border-color: var(--orange-hover); box-shadow: 0 4px 12px #f5790a24; }
.secondary { background: #fff; border-color: #d7dce2; color: #343c47; box-shadow: 0 1px 2px #1c273005; }
.secondary:hover:not(:disabled) { background: #f8f9fb; border-color: #aeb7c2; }
.actions [data-completed=true] { color: #237047; background: #f0faf4; border-color: #c7e5d3; }
.document-hint {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 7px 24px;
  background: var(--soft); color: #5c6673; font-size: 12px; line-height: 1.5; border-bottom: 1px solid var(--border);
}
.hint-icon { width: 17px; height: 17px; color: #778391; }
.document-hint:not(.settled) .hint-icon { animation: hint-pulse 1.4s ease-in-out infinite; }
.document-hint button {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font-size: 12px;
  border: 0; border-radius: 5px; padding: 4px 5px; background: transparent; color: #48525f; white-space: nowrap;
  transition: background .18s;
}
.document-hint button:hover { background: #e9edf2; }
.document-hint button .icon { width: 17px; height: 17px; transition: transform .5s var(--ease); }
.document-hint button:hover .icon { transform: rotate(45deg); }
.document-area { flex: 1; min-height: 0; position: relative; background: #fff; overflow: hidden; }
.document-area iframe { display: block; border: 0; width: 100%; height: 100%; transition: filter .55s var(--ease), transform .55s var(--ease); }
.document-area.is-loading iframe { filter: blur(2px); transform: translateY(6px); pointer-events: none; }
.test-banner { flex-shrink: 0; padding: 4px 16px; background: #edf5ff; color: #40608a; text-align: center; font-size: 10px; line-height: 1.4; font-weight: 600; border-bottom: 1px solid #dfeaf7; }
.action-dialog {
  width: min(520px, calc(100% - 32px)); border: 1px solid #e2e6eb; border-radius: 16px; padding: 32px;
  background: #fff; color: var(--ink); box-shadow: 0 24px 80px #1421312b, 0 4px 16px #1421310d;
  max-height: calc(100dvh - 32px); overflow: auto; opacity: 0; transform: translateY(10px) scale(.98);
  transition: opacity .22s ease, transform .3s var(--ease), overlay .3s allow-discrete, display .3s allow-discrete;
}
.action-dialog[open] { opacity: 1; transform: none; }
.action-dialog::backdrop { background: #17243255; backdrop-filter: blur(4px); opacity: 0; transition: opacity .22s, overlay .3s allow-discrete, display .3s allow-discrete; }
.action-dialog[open]::backdrop { opacity: 1; }
@starting-style { .action-dialog[open] { opacity: 0; transform: translateY(12px) scale(.98); } .action-dialog[open]::backdrop { opacity: 0; } }
.close-dialog { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; border: 0; color: #697483; background: transparent; border-radius: 8px; width: 32px; height: 32px; transition: color .18s, background .18s; }
.close-dialog:hover { color: var(--ink); background: var(--soft); }
.close-dialog .icon { width: 19px; height: 19px; }
.dialog-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff2e7; color: #e36a06; margin-bottom: 22px; }
.dialog-icon .icon { width: 26px; height: 26px; }
.action-dialog h1, .empty-card h1 { font-size: 27px; font-weight: 650; line-height: 1.2; letter-spacing: -.7px; margin: 0 0 16px; }
.action-dialog p, .help-steps { font-size: 14px; line-height: 1.75; color: #606b78; }
.dialog-description { margin-bottom: 24px; }
.confirmation-check { display: flex; align-items: flex-start; gap: 11px; background: #f7f8fa; padding: 15px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; line-height: 1.6; transition: background .2s, border-color .2s; cursor: pointer; }
.confirmation-check:has(input:checked) { background: #fff7f0; border-color: #f5bd8e; }
.confirmation-check input { accent-color: #ed740a; width: 18px; height: 18px; flex-shrink: 0; margin: 1px 0; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 26px; }
.form-feedback:empty { display: none; }
.form-feedback { padding: 13px 15px; margin-top: 16px; border-radius: 9px; background: #f3f6fa; color: #485669; font-size: 13px; line-height: 1.6; animation: feedback-in .24s var(--ease); }
.form-feedback[data-state=error] { background: #fff1f0; color: #ab3432; border: 1px solid #f5d5d3; }
.form-feedback[data-state=success] { background: #edf9f1; color: #267049; border: 1px solid #cfe8d9; }
.shell-form[data-state=sending] button[type=submit]::before { content: ""; width: 13px; height: 13px; border: 2px solid #ffffff4d; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.shell-form[data-state=success] .confirmation-check, .shell-form[data-state=success] button[type=submit] { display: none; }
.shell-form [data-freeform-errors], .shell-form .ff-form-errors { font-size: 13px; color: #ab3432; }
.help-steps { padding-left: 20px; }
.help-steps li { padding: 4px 0 12px 4px; }
.help-steps li::marker { font-weight: 650; color: var(--ink); }
#help-dialog>a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #a64c00; text-underline-offset: 3px; }
#help-dialog>a .icon { width: 15px; height: 15px; }
.support { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 25px; }
.support a { text-underline-offset: 3px; }
.empty-state { display: grid; place-items: center; flex: 1; padding: 40px 20px; background: #f6f8fb; }
.empty-card { width: min(550px, 100%); padding: 40px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: 0 8px 32px #1f30400a; }
.empty-card p { font-size: 15px; line-height: 1.75; color: #606b78; }
.empty-card .button { margin: 12px 0 22px; }
.text-link { display: block; font-size: 13px; text-underline-offset: 3px; }
.notice { padding: 15px; background: #edf5ff; }
.radio-pause, .equalizer { display: none; }
.radio-toggle[aria-pressed=true] { color: #cf5d00; background: #fff3e8; }
.radio-toggle[aria-pressed=true] .radio-play { display: none; }
.radio-toggle[aria-pressed=true] .radio-pause { display: block; }
.radio-toggle[aria-pressed=true] .equalizer { display: flex; }
.equalizer { height: 14px; align-items: center; gap: 2px; }
.equalizer i { width: 2px; height: 10px; border-radius: 1px; background: currentColor; animation: equalize .8s ease-in-out infinite alternate; }
.equalizer i:nth-child(2) { animation-delay: -.5s; height: 14px; }
.equalizer i:nth-child(3) { animation-delay: -.2s; height: 8px; }
/* The original printer and typewriter welcome remain part of the brand. */
.document-preloader[hidden] { display: none; }
.document-preloader { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; overflow: auto; padding: 24px; background: #fff; opacity: 1; transition: opacity .45s var(--ease), visibility .45s; }
.document-preloader.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-content { text-align: center; width: min(100%, 460px); padding: 16px 0; transition: transform .55s var(--ease), opacity .4s; }
.is-leaving .preloader-content { transform: translateY(-8px) scale(.985); opacity: 0; }
.typewriter-title { font: 650 clamp(22px, 3vw, 30px)/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.04em; display: flex; justify-content: center; }
.typewriter-title span { display: block; white-space: nowrap; overflow: hidden; width: calc(16ch - .64em + 3px); border-right: 3px solid var(--orange); animation: shell-typing 1.8s steps(16,end), shell-caret .65s step-end infinite; }
.preloader-printer { display: block; width: min(360px,100%); height: clamp(130px,28vh,260px); object-fit: contain; margin: 16px auto 10px; }
.preloader-badge { display: inline-flex; align-items: center; gap: 16px; background: #2788ec; color: #fff; border-radius: 7px; padding: 9px 14px; font-size: 12px; font-weight: 600; }
.preloader-dots { position: relative; width: 62px; height: 12px; }
.preloader-dots i { position: absolute; left: 0; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: shell-dots 1.7s cubic-bezier(.5,0,.5,1) infinite; }
.preloader-dots i:nth-child(2) { animation-delay: .12s; opacity: .7; }
.preloader-dots i:nth-child(3) { animation-delay: .24s; opacity: .4; }
.preloader-content p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 20px 0 8px; }
.preloader-content>button { border: 0; background: transparent; color: #4e5a68; border-radius: 6px; text-decoration: underline; text-underline-offset: 4px; font-size: 12px; padding: 8px 12px; transition: background .2s; }
.preloader-content>button:hover { background: var(--soft); }
@keyframes shell-typing { from { width: 0; } to { width: calc(16ch - .64em + 3px); } }
@keyframes shell-caret { 50% { border-color: transparent; } }
@keyframes shell-dots { 50% { transform: translateX(54px); } }
@keyframes hint-pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes equalize { to { transform: scaleY(.35); } }
@keyframes feedback-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 1000px) {
  .shell-header { gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
  .brand strong { font-size: 19px; }
  .actions { padding-left: 12px; gap: 8px; }
  .button { font-size: 12px; padding: 10px 12px; }
  .quiet-button { gap: 6px; padding: 8px; }
  .document-hint { padding: 7px 18px; }
}
@media (max-width: 800px) {
  .shell-header { padding: 14px 18px 12px; gap: 12px; }
  .actions { flex-basis: 100%; padding: 12px 0 0; border-left: 0; border-top: 1px solid #edf0f3; justify-content: flex-end; }
  .document-hint { font-size: 11px; gap: 8px; }
  .document-hint button { font-size: 11px; }
}
@media (max-width: 520px) {
  .shell-header { padding: 12px 14px 11px; gap: 10px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand strong { font-size: 18px; letter-spacing: -.55px; }
  .brand small { font-size: 10px; margin-top: 2px; }
  .utilities { gap: 0; }
  .quiet-button { padding: 7px; min-height: 36px; gap: 4px; font-size: 11px; }
  .quiet-button .icon { width: 18px; height: 18px; }
  .equalizer { display: none !important; }
  .actions { padding-top: 10px; gap: 8px; }
  .actions .button { flex: 1; min-width: 0; min-height: 44px; font-size: 11px; padding: 8px; gap: 7px; }
  .actions .icon { width: 18px; height: 18px; }
  .document-hint { padding: 8px 14px; font-size: 10px; align-items: flex-start; }
  .hint-icon { margin-top: 1px; width: 15px; height: 15px; }
  .document-hint button { font-size: 0; padding: 2px 1px 2px 4px; gap: 0; }
  .document-hint button span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .document-hint button .icon { width: 19px; height: 19px; }
  .test-banner { font-size: 9px; padding: 4px 10px; }
  .action-dialog { padding: 27px 22px 22px; border-radius: 14px; }
  .action-dialog h1 { font-size: 25px; }
  .dialog-description { font-size: 13px !important; }
  .dialog-actions { flex-direction: column-reverse; gap: 8px; }
  .dialog-actions .button { width: 100%; min-height: 44px; }
  .empty-card { padding: 28px; }
  .document-preloader { padding: 16px; }
  .preloader-content { padding: 8px 0; }
  .preloader-printer { max-width: 280px; }
  .typewriter-title { font-size: 25px; }
}
@media (max-width: 360px) { .quiet-button span:not(.equalizer) { display: none; } .quiet-button { width: 32px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
