/* ==========================================================================
   HX Console — Phase 6 design layer
   Loaded after hx-phase4.css.

     1. Print — releasing the modal scroll lock in paged media
     2. The panel shown after a document is saved
   ========================================================================== */

/* ==========================================================================
   1. Print
   --------------------------------------------------------------------------
   The reason printed documents came out with nothing below the letterhead.

   openModal() locks page scrolling with an inline
   document.body.style.overflow = 'hidden'. Every print button in this console
   sits inside a modal, so at print time body still carried it — and in paged
   media, overflow:hidden on body clips the whole document to a single page box.

   core/document.js now lifts the lock for the duration of the print, which is
   the real fix. This is the second belt: an !important author declaration
   outranks a normal inline style, so even a print triggered from somewhere that
   has not been through document.js cannot be clipped this way.
   ========================================================================== */

@media print {
    html, body {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    /* A modal is a body child, so the is-printing rule already hides it. This
       makes sure nothing it left behind can cover the page. */
    .modal-back, .toasts { display: none !important; }

    .printdoc {
        overflow: visible !important;
        max-height: none !important;
    }

    /* A document with no line items says so, rather than printing a bare table
       header that reads as a fault. */
    .printdoc-empty {
        margin: 0 0 16px;
        padding: 10px 12px;
        border: .5px dashed #999;
        font-size: 11px;
        color: #444;
    }
}

/* ==========================================================================
   2. Saved panel
   --------------------------------------------------------------------------
   Shown once a document is saved. Deliberately quiet and centred: it is a
   confirmation with three ways out, not a form.
   ========================================================================== */

.saved { text-align: center; padding: 6px 0 2px; }

.saved-mark {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--pos-soft, color-mix(in srgb, var(--pos) 14%, transparent));
}
.saved-mark svg { width: 27px; height: 27px; fill: var(--pos); }

.saved-ref {
    margin: 0;
    font-family: var(--mono);
    font-size: var(--t-xl);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
    font-feature-settings: 'tnum' 1, 'zero' 1;
}
.saved-sub { margin: 4px 0 0; font-size: var(--t-sm); color: var(--text-3); }

.saved-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px 18px;
    margin: 18px 0 0;
    padding: 14px 16px;
    text-align: left;
    background: var(--surface-2);
    border-radius: var(--r-sm);
}
.saved-figures > div { min-width: 0; }
.saved-figures dt {
    font-size: var(--t-xs); font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--text-3); margin-bottom: 3px;
}
.saved-figures dd {
    margin: 0;
    font-family: var(--mono);
    font-size: var(--t-num);
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
    font-feature-settings: 'tnum' 1, 'zero' 1;
}
/* A name is not a figure, so it is not set in the figure face. */
.saved-figures > div:first-child dd { font-family: var(--font); font-weight: 600; }
.saved-figures dd.is-neg { color: var(--neg); }
.saved-figures dd.is-pos { color: var(--pos); }

@media (max-width: 560px) {
    .saved-figures { grid-template-columns: 1fr 1fr; }
    .modal-foot .btn { flex: 1 1 auto; }
}
