/* Aging report tool. Loaded after demo.css and uses its tokens. */
.intro h1 { max-width: 13em; }
.gp-start { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; padding-bottom: 2rem; align-items: stretch; }
.gp-drop { background: var(--panel); border: 2px dashed var(--rule); border-radius: 12px; padding: 1.75rem; }
.gp-drop.over { border-color: var(--ink); background: #fff; }
.gp-drop h2, .gp-side h2 { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 0.5rem; }
.gp-drop p { margin: 0 0 1.1rem; color: var(--muted); max-width: 58ch; }
.gp-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
button.btn { font: inherit; font-weight: 500; border: 0; cursor: pointer; }
.gp-btn { font: inherit; font-weight: 500; background: none; color: var(--ink); border: 1px solid var(--ink); border-radius: 8px; padding: 0.55rem 0.95rem; cursor: pointer; white-space: nowrap; }
.gp-btn:hover { background: var(--surface); }
.gp-msg { margin: 1rem 0 0 !important; color: var(--ink) !important; }
.gp-msg.bad { color: var(--neg) !important; }
.gp-side { padding: 1.75rem 0.25rem 0; }
.gp-side ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); }
.gp-side li { margin-bottom: 0.3rem; }
.gp-side summary, .gp-cols summary, .gp-qa summary { cursor: pointer; font-weight: 500; }
.gp-side details p { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.gp-side details b { color: var(--ink); font-weight: 500; }
.gp-results { padding-bottom: 3rem; scroll-margin-top: 1rem; }
.gp-head { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; align-items: end; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.gp-head p { margin: 0; color: var(--muted); max-width: 56ch; }
.gp-controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.gp-controls label, .gp-map label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8125rem; color: var(--muted); }
input[type="date"], input[type="text"] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 0.5rem 0.7rem; max-width: 100%; }
#gp-sales { width: 9rem; }
.sheet h2.gp-h { margin: 2.25rem 0 0.25rem; }
.gp-h + .hint { margin: 0 0 0.75rem; }
.tot td { font-weight: 500; border-bottom: 0; border-top: 2px solid var(--ink); }
.gp-calls { margin: 0.75rem 0 0; padding: 0; list-style: none; counter-reset: c; }
.gp-calls li { counter-increment: c; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.gp-call { display: flex; gap: 0.75rem 1.5rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.gp-call > div { display: flex; flex-direction: column; }
.gp-call b { font-weight: 500; }
.gp-call b::before { content: counter(c) ". "; color: var(--muted); font-weight: 400; }
.gp-call span { color: var(--muted); font-size: 0.9375rem; }
.gp-letter { margin-top: 0.75rem; }
.gp-letter textarea { width: 100%; font: 0.875rem/1.5 "DM Mono", ui-monospace, Menlo, Consolas, monospace; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: 0.75rem; resize: vertical; }
.gp-letter > div { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.gp-letter span { color: var(--muted); font-size: 0.8438rem; }
.gp-out { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }
.gp-cols { margin-top: 1.5rem; }
.gp-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem 1rem; margin-top: 0.75rem; }
.gp-printfoot { display: none; }
.ph { display: none; }
.gp-read { padding-block: 3rem 2rem; display: grid; gap: 2.5rem; }
.gp-read section { max-width: 56rem; }
.gp-read h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 0.75rem; }
.gp-read p { margin: 0 0 0.9rem; max-width: 68ch; color: var(--ink); }
.gp-formula { font-family: "DM Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 0.9375rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 0.75rem 1rem; display: inline-block; }
.gp-qa details { border-bottom: 1px solid var(--rule); padding: 0.8rem 0; }
.gp-qa details:first-child { border-top: 1px solid var(--rule); }
.gp-qa details p { margin: 0.5rem 0 0; color: var(--muted); }
.foot a { text-underline-offset: 3px; }
@media (max-width: 899px) {
  .gp-start { grid-template-columns: 1fr; gap: 0.5rem; }
  .gp-drop { padding: 1.25rem; }
  .gp-side { padding: 1rem 0 0; }
  .gp-call .gp-btn { width: 100%; }
  .gp-out .gp-btn { flex: 1 1 100%; }
}
@media (max-width: 699px) {
  .bk { display: none; }
  .ph { display: table-cell; }
  .res td:first-child { min-width: 0; }
  .detail > td { padding: 0.6rem 0.75rem 0.8rem; }
}
@media print {
  body { background: #fff; }
  .top, .intro, .gp-start, .close, .gp-read, .foot, .gp-out, .gp-cols, .gp-controls, .gp-calls .gp-btn, .hint { display: none !important; }
  .sheet { border: 0; padding: 0; background: #fff; }
  .gp-letter textarea { border: 0; background: #fff; height: auto; }
  .gp-printfoot { display: block; margin-top: 1.5rem; font-size: 0.8125rem; color: #555; }
}
/* email-only box in the closing section of tool pages */
.lead { margin-top: 1.1rem; max-width: 34rem; }
.lead label { display: block; font-size: 0.9375rem; margin-bottom: 0.35rem; }
.lead-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.lead input[type="email"] { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 0.55rem 0.7rem; flex: 1 1 14rem; min-width: 0; }
.lead input[aria-invalid="true"] { border-color: var(--neg); }
.lead .lead-msg { margin: 0.5rem 0 0; color: var(--ink); font-size: 0.9375rem; }
.lead .lead-msg:empty { display: none; }
.close .lead .hint { margin: 0.5rem 0 0; font-size: 0.8125rem; }
