/* Shared page frame and footer. Screen layout stays separate from invoice printing. */
@media screen {
  html { scrollbar-gutter: stable; }
  body.site-page {
    --site-width: 1280px;
    --site-gutter: 32px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
  }
  .site-page > header,
  .site-page > main,
  .site-page > .site-footer {
    box-sizing: border-box;
    width: min(var(--site-width), calc(100% - var(--site-gutter) * 2));
    margin-inline: auto;
    margin-block: 0;
  }
  .site-page > header { flex: 0 0 auto; }
  .site-page > main { flex: 1 0 auto; min-height: 0; min-width: 0; }
  .site-page.site-print > main { width: 100%; }
  .site-page > .site-footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 96px;
    padding: 20px 0;
    border: 0;
    border-block-start: 1px solid #dce2d6;
    color: #697268;
    font: 14px/1.7 NotoNaskhArabic, Tahoma, sans-serif;
    text-align: start;
  }
  .site-footer .site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #29382f;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
  }
  .site-footer__mark {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: #435b47;
    color: #fff;
    font-size: 23px;
    line-height: 1;
  }
  .site-footer .site-footer__note {
    margin: 0;
    color: #697268;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .site-footer .site-footer__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding: 0;
    border: 0;
  }
  .site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #697268;
    font-size: 13px;
    line-height: 1.7;
    white-space: nowrap;
    text-decoration: none;
  }
  .site-footer a:hover { color: #3d5e49; text-decoration: underline; text-underline-offset: 4px; }
  .site-footer a:focus-visible { outline: 2px solid #3d5e49; outline-offset: 4px; border-radius: 3px; }
}
@media screen and (max-width: 900px) {
  body.site-page { --site-gutter: 16px; }
  .site-page > .site-footer {
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    min-height: 144px;
    column-gap: 16px;
    row-gap: 8px;
  }
  .site-footer .site-footer__note { grid-column: 1 / -1; grid-row: 2; text-align: start; }
  .site-footer .site-footer__links { gap: 14px; }
}
@media screen and (max-width: 480px) {
  .site-footer .site-footer__brand { font-size: 16px; gap: 8px; }
  .site-footer .site-footer__links { gap: 10px; }
  .site-footer__links a { font-size: 12px; }
}
@media print { .site-footer { display: none !important; } }
