/* ==========================================================================
   admin/css/quote.css — THE QUOTE AS A DOCUMENT (MOON-05, 2026-10-20)

   One look for the Office's preview, the client's account and paper
   (quote-view.mjs draws it). A panel one step up from the stage (rule 19),
   its deposit a line of the total, its terms and its signature at its foot (0011),
   8px corners for a surface (rule 8), white for the figure and nothing else
   in colour (rule 7), figures in tabular digits so a column of amounts lines
   up, and on paper black on white with nothing cut off.
   ========================================================================== */
.qd {
  --qd-ink: var(--tk-grey-f2);
  --qd-dim: var(--tk-grey-a3);
  --qd-line: var(--tk-grey-26);
  max-width: 44rem;
  padding: 28px 28px 24px;
  border: 1px solid var(--tk-grey-2a);
  border-radius: var(--tk-r-md);
  background: var(--tk-grey-14);
  color: var(--qd-ink);
  font: 400 15px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.qd__head { display: grid; gap: 8px; margin-bottom: 20px; }
.qd__top {
  display: flex; justify-content: space-between; gap: 12px; margin: 0;
  font: 500 12px/1.4 "Inter", sans-serif; letter-spacing: .02em; color: var(--qd-dim);
}
.qd__no { font-variant-numeric: tabular-nums; }
.qd__title {
  margin: 4px 0 0;
  font: 600 1.5rem/1.2 "Inter Tight", "Inter", sans-serif; letter-spacing: -.015em;
  text-wrap: balance;
}
.qd__for, .qd__state { margin: 0; font-size: 14px; color: var(--qd-dim); }
.qd__state--accepted { color: var(--tk-ok); }
.qd__state--expired, .qd__state--withdrawn { color: var(--tk-grey-a3); }
.qd__note { margin: 0 0 12px; max-width: 62ch; text-wrap: pretty; }
.qd__lines { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.qd__cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.qd__lines th, .qd__lines td { padding: 12px 0; border-bottom: 1px solid var(--qd-line); text-align: left; vertical-align: top; }
.qd__lines thead th {
  padding-top: 0; font: 500 12px/1.4 "Inter", sans-serif; color: var(--qd-dim); letter-spacing: .02em;
}
.qd__item { font-weight: 400; }
.qd__label { display: block; font-weight: 600; }
.qd__detail { display: block; margin-top: 2px; font-size: 13.5px; color: var(--qd-dim); max-width: 52ch; }
.qd__amt { text-align: right !important; white-space: nowrap; padding-left: 16px !important; font-variant-numeric: tabular-nums; }
.qd__lines tfoot th, .qd__lines tfoot td { border-bottom: 0; padding-top: 16px; font-weight: 600; }
.qd__total { color: var(--tk-white); font-size: 16px; }
.qd__now, .qd__then { display: block; }
.qd__then { margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--qd-dim); }
.qd__holds { margin: 0 0 12px; color: var(--qd-dim); font-size: 14px; }
.qd__facts { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; color: var(--qd-dim); }
/* THE DEPOSIT, a line of the total (0011): paid when it is signed. */
.qd__lines tfoot .qd__deposit th, .qd__lines tfoot .qd__deposit td { padding-top: 4px; font-weight: 500; font-size: 14px; color: var(--qd-dim); }
/* TAX BY PLACE (0067): before tax and each rate's tax above the total, quieter than it; how it was worked out under. */
.qd__lines tfoot :is(.qd__subtotal, .qd__tax) th, .qd__lines tfoot :is(.qd__subtotal, .qd__tax) td { padding-top: 4px; font-weight: 500; font-size: 14px; color: var(--qd-dim); }
.qd__lines tfoot .qd__subtotal th, .qd__lines tfoot .qd__subtotal td { padding-top: 16px; }
.qd__taxnote { margin: -4px 0 16px; font-size: 13px; color: var(--qd-dim); max-width: 62ch; }
/* THE QUOTE'S OWN TERMS, signed with it. */
.qd__terms { margin: 4px 0 16px; padding-top: 16px; border-top: 1px solid var(--qd-line); }
.qd__terms-h { margin: 0 0 8px; font: 600 13px/1.4 "Inter", sans-serif; letter-spacing: .02em; color: var(--qd-dim); }
.qd__terms-p { margin: 0 0 8px; max-width: 62ch; font-size: 14px; text-wrap: pretty; white-space: pre-line; }
/* THE SIGNATURE: the name as they typed it, in the serif, the moment and the login under it. */
.qd__sig { margin: 0 0 16px; padding: 16px; border: 1px solid var(--qd-line); border-radius: var(--tk-r-md); }
.qd__sig-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.qd__sig-k { font-size: 13.5px; color: var(--qd-dim); }
.qd__sig-name { font: 400 22px/1.2 "tkati Serif Display", Georgia, "Times New Roman", serif; letter-spacing: -.005em; overflow-wrap: anywhere; }
.qd__sig-when { margin: 4px 0 0; font-size: 13px; color: var(--qd-dim); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.qd__sig-paid { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--tk-ok); }
.qd__state--replaced { color: var(--tk-grey-a3); }
.qd__ask { margin: 0; font-size: 13.5px; color: var(--qd-dim); }
.qd__ask a { color: var(--qd-ink); text-underline-offset: 3px; }
.qd__ask a:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; box-shadow: 0 0 0 1px var(--focus-halo); border-radius: var(--tk-r-2xs); }

@media (max-width: 520px) {
  .qd { padding: 20px 16px 20px; }
  .qd__title { font-size: 1.3rem; }
  .qd__lines thead { display: none; }
  .qd__lines tr { display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--qd-line); padding: 12px 0; }
  .qd__lines th, .qd__lines td { border-bottom: 0; padding: 0; }
  .qd__amt { text-align: left !important; padding-left: 0 !important; margin-top: 4px; }
  .qd__lines tfoot tr { border-bottom: 0; padding-top: 16px; }
}

@media print {
  .qd { max-width: none; border: 0; background: var(--tk-white); color: var(--tk-black); padding: 0; --qd-ink: var(--tk-black); --qd-dim: var(--tk-grey-33); --qd-line: var(--tk-grey-bb); }
  .qd__total { color: var(--tk-black); }
  .qd__state--accepted, .qd__sig-paid { color: var(--tk-black); }
  .qd__lines tr { break-inside: avoid; }
}
@media (forced-colors: active) {
  .qd { border-color: CanvasText; }
}
