/* Public buyer page (jaa.html) and the PC share dialog.
   Screen: the same dark garage look as the PC. Print: a light, ink-friendly
   report, so "Tulosta / PDF" gives something to attach to a sales ad. */

/* ---- Buyer page ---- */
.share main { max-width: 1100px; }
.sh-head { display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap; padding: 22px 24px; border-radius: 14px; border: 1px solid var(--border);
  background: radial-gradient(120% 140% at 0% 0%, rgba(57, 135, 229, 0.16), transparent 55%), var(--surface); }
.sh-id { flex: 1; min-width: 220px; }
.sh-head h1 { margin: 2px 0 4px; font-size: 32px; line-height: 1.1; }
.sh-sub { color: var(--text-2); }
.sh-head .plate { position: static; transform: none; font-size: 20px; }
.tbl-wrap { overflow-x: auto; }
.sh-table { min-width: 520px; }
.sh-table th, .sh-table td { vertical-align: top; padding-right: 14px; }
.sh-table th:last-child, .sh-table td:last-child { padding-right: 0; }
.sh-table .d { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sh-table .num { white-space: nowrap; }
.sh-table .pass { color: var(--good); }
.src-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 6px; text-decoration: none; white-space: nowrap; }
.sh-note { font-size: 13px; margin: 10px 0 0; }
.sh-specs { grid-template-columns: max-content 1fr; }
.sh-papers { display: grid; gap: 16px; }
.paper { margin: 0; display: grid; gap: 8px; }
.paper figcaption { font-weight: 600; color: var(--text-2); }
.paper img { display: block; max-width: 100%; max-height: 80vh; border-radius: 6px; background: var(--page); }
.sh-foot { font-size: 13px; padding: 4px 2px; }

@media (max-width: 640px) {
  .sh-head { padding: 18px; }
  .sh-head h1 { font-size: 26px; }
}

/* ---- PC share dialog ---- */
.share-dlg { display: grid; gap: 14px; }
.share-dlg p { margin: 0; }
.share-link { display: flex; gap: 6px; flex-wrap: wrap; }
.share-link input { flex: 1; min-width: 240px; font: inherit; font-size: 14px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--axis); background: var(--page); color: var(--text); }
.share-opts { display: grid; gap: 10px; }
.share-opts label.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.share-opts label.check input { margin-top: 4px; }
.share-opts small { display: block; color: var(--muted); font-size: 12px; }
.share-papers { display: grid; gap: 4px; margin: 0 0 0 28px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 14px; }
.share-papers label { display: flex; gap: 8px; align-items: center; }
.share-never { font-size: 13px; color: var(--muted); border-left: 3px solid var(--axis); padding-left: 10px; }

/* ---- Print: light report ---- */
@media print {
  :root {
    color-scheme: light;
    --page: #ffffff;
    --surface: #ffffff;
    --surface-2: #f3f3f0;
    --border: #d4d3cc;
    --text: #111111;
    --text-2: #333333;
    --muted: #666660;
    --grid: #e3e2dc;
    --axis: #b9b8b0;
    --s1: #2a6fc9;
    --s2: #c24d1b;
    --good: #0a7d0a;
    --critical: #b42323;
  }
  @page { margin: 14mm; }
  html, body { background: #fff; color: var(--text); }
  body { font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .tip { display: none !important; }
  .share main { max-width: none; padding: 0; gap: 12px; }
  .sh-head, .panel, .tile, .alert { background: #fff; box-shadow: none; }
  .tile, .alert, .chart, .paper, tr { break-inside: avoid; }
  .panel-head { break-after: avoid; }
  .al-critical { background: #fff; }
  .alert > b { color: #fff; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .t-value { font-size: 20px; }
  .tbl-wrap { overflow: visible; }
  .sh-table { min-width: 0; }
  .chart svg { width: 100%; height: auto; }
  .chart .area.s1 { opacity: 0.15; }
  .src-tag { border-color: #999; }
  .insp .fail { color: var(--critical); }
  .paper img { max-height: 240mm; max-width: 100%; }
  a { text-decoration: none; }
}
