:root {
      color-scheme: light;
      --canvas: #f0f0f3;
      --card: #fff;
      --ink: #272a30;
      --muted: #727781;
      --line: #d6d8df;
      --green: #299b7e;
      --blue: #1688ec;
      --shadow: 0 1px 2px rgba(22, 26, 33, .05);
    }
    * { box-sizing: border-box; }
    html { background: var(--canvas); }
    body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
    button { color: inherit; font: inherit; }
    .topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
    .top-actions { display: flex; align-items: center; gap: 26px; }
    .pdf-button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); text-decoration: none; font-weight: 550; }
    .pdf-button:hover { background: var(--canvas); }
    .pdf-button svg { width: 17px; height: 17px; color: #68717e; }
    .theme-button { display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); border: 0; background: transparent; border-radius: 50%; cursor: pointer; }
    .theme-button:hover { background: var(--canvas); }
    .theme-button svg { width: 21px; height: 21px; }
    main { max-width: 1800px; margin: 0 auto; padding: 0 10px 32px; }
    .report-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(390px, 1fr) minmax(330px, 1fr); gap: 14px 40px; align-items: start; }
    .card { background: var(--card); border: 1px solid #e4e5e9; box-shadow: var(--shadow); }
    .product-card { min-height: 524px; }
    .product-photo { height: 286px; display: grid; place-items: center; overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); }
    .product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
    .product-copy { padding: 21px 28px 26px; }
    h1 { margin: 0 0 4px; color: #686d75; font-size: clamp(20px, 1.8vw, 27px); font-weight: 650; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sample-id { font-size: 15px; }
    .product-kind { margin: 14px 0 0; color: #4b4f56; }
    .subline { margin-top: 15px; color: var(--muted); font-size: 13px; }
    .center-card { padding: 10px 18px 22px; min-height: 524px; }
    .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .stat { min-height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #73c7ae; text-align: center; color: var(--green); padding: 7px; }
    .stat-value { font-size: clamp(22px, 2vw, 34px); font-weight: 650; line-height: 1.15; white-space: nowrap; }
    .stat-value small { font-size: .48em; }
    .stat-label { margin-top: 3px; font-size: 14px; font-weight: 600; line-height: 1.35; }
    .table-wrap { margin-top: 14px; border: 1px solid var(--line); overflow: auto; max-height: 300px; }
    table { width: 100%; border-collapse: collapse; text-align: left; }
    th, td { padding: 10px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
    th { font-size: 14px; font-weight: 650; background: var(--card); position: sticky; top: 0; }
    td:nth-child(n+2), th:nth-child(n+2) { text-align: right; }
    tbody tr:last-child td { border-bottom: 0; }
    .right-stack { display: grid; gap: 14px; }
    .lab-card { min-height: 524px; padding: 18px 28px 24px; display: flex; flex-direction: column; }
    .client-name { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 650; }
    .lab-info { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 14px; margin-top: 98px; }
    .lab-details { font-size: 17px; line-height: 1.55; }
    .lab-details strong { font-weight: 650; }
    .lab-details a { color: inherit; text-decoration: none; }
    .lab-logo { width: 100%; max-width: 260px; height: auto; }
    .small-card { background: var(--card); border: 1px solid #e4e5e9; box-shadow: var(--shadow); }
    .card-heading { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 500; }
    .tests-content { padding: 28px 26px; }
    .tested-badge { height: 92px; border: 1px solid #2c93ed; display: grid; place-items: center; color: var(--blue); font-size: clamp(40px, 4vw, 68px); font-weight: 350; line-height: 1; }
    .divider { height: 1px; background: var(--line); margin: 19px 0; }
    .test-table { border: 1px solid var(--line); min-height: 255px; }
    .test-table th { background: transparent; }
    .status { text-align: right; }
    .status strong { font-weight: 500; }
    .test-info { min-height: 166px; }
    .test-info p { padding: 19px 20px; margin: 0; }
    .sample-facts { margin: auto 0 0; padding-top: 24px; color: var(--muted); font-size: 13px; }
    .sample-facts span { display: block; margin-top: 3px; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    body.dark { color-scheme: dark; --canvas: #1c1e22; --card: #292c32; --ink: #f0f1f4; --muted: #a9adb6; --line: #484c55; --shadow: none; }
    body.dark .product-photo { background: #f9f9f8; }
    body.dark h1, body.dark .product-kind { color: var(--ink); }
    @media (max-width: 1120px) {
      .report-grid { grid-template-columns: minmax(280px, 1fr) minmax(360px, 1fr); gap: 14px; }
      .right-stack { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
      .lab-card { min-height: 340px; }
      .lab-info { margin-top: 52px; }
      .center-card { min-height: 524px; }
    }
    @media (max-width: 720px) {
      .topbar { height: 56px; padding: 0 12px; }
      main { padding: 0 8px 20px; }
      .report-grid { display: flex; flex-direction: column; gap: 10px; }
      .report-grid > *, .right-stack { width: 100%; }
      .product-card { min-height: auto; }
      .product-photo { height: min(66vw, 300px); }
      .product-copy { padding: 18px; }
      .center-card { min-height: 0; padding: 10px 12px 18px; }
      .stat { min-height: 94px; }
      .stat-label { font-size: 12px; }
      th, td { padding: 9px 8px; font-size: 13px; }
      .right-stack { display: contents; }
      .lab-card { min-height: 360px; padding: 18px; }
      .lab-info { margin-top: 55px; grid-template-columns: 1fr 1fr; }
      .lab-details { font-size: 14px; }
      .tests-content { padding: 20px 16px; }
      .test-info { min-height: 140px; }
    }
