/* Objective Testing reuses the existing quick-form visual language. */
.test-form { max-width: 720px; }
.test-datetime-row { display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.test-datetime-row label { margin:0; }
.test-metrics-grid { min-inline-size:0; border:0; padding:0; }
.test-metrics-grid > p { margin:0 0 12px; color:#65716d; font-size:13px; }
.test-metrics-grid > div { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.test-metrics-grid label { display:flex; flex-direction:column; gap:6px; margin:0; color:#33434a; font-size:13px; font-weight:600; }
.test-metrics-grid label span { display:flex; align-items:center; gap:7px; color:#65716d; font-weight:500; }
.test-metrics-grid input { width:100%; min-width:0; height:40px; padding:0 9px; border:1px solid #bfc9c6; border-radius:4px; background:#fffdfa; color:#071927; font:500 15px "Noto Sans SC", sans-serif; }
.test-metrics-grid input:focus { outline:2px solid #ff7041; outline-offset:1px; }
.test-history-meta { display:flex; gap:8px; flex-wrap:wrap; color:#536069; font-size:13px; }
.test-history-value { color:#ff7041; font:700 24px "Barlow Condensed", sans-serif; letter-spacing:.02em; }
.test-detail-actions { display:flex; gap:10px; margin-top:18px; }
.test-detail-actions button { cursor:pointer; }
.test-delete { border-color:#b84a38; color:#9f351f; background:#fffdfa; }
.test-delete:hover { background:#fff1ec; }
.test-edit-banner { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 14px; margin-bottom:16px; border:1px solid #e3c4b7; background:#fff8f2; color:#5d372c; font-size:13px; }
.test-edit-banner button { border:0; background:transparent; color:#9f351f; text-decoration:underline; cursor:pointer; }
.testing-trends { margin-top:34px; padding:22px; border:1px solid #d7dfda; border-radius:8px; background:#fffdfa; }
.testing-trend-controls { display:grid; grid-template-columns:1fr minmax(126px,.45fr); gap:12px; margin:14px 0; }
.testing-trend-summary { margin:0 0 14px; }
.testing-trend-summary article { min-width:0; }
.testing-trend-performance { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 18px; padding:17px 18px; border-left:4px solid #d8fb51; border-radius:6px; background:#e4e7df; }
.testing-trend-performance>div:first-child { min-width:0; }
.testing-trend-summary span,.testing-trend-summary small { display:block; color:#65716d; font-size:12px; line-height:1.55; }
.testing-trend-summary b { display:block; margin:4px 0; color:#071927; font:700 30px/1.08 "Barlow Condensed", sans-serif; overflow-wrap:anywhere; }
.testing-trend-summary b.is-positive { color:#bd4a27; }
.testing-trend-condition { grid-column:1 / -1; margin:0; color:#65716d; font-size:12px; line-height:1.55; }
.testing-trend-tags { display:flex; flex-wrap:wrap; align-content:start; justify-content:flex-end; gap:6px; min-width:0; }
.testing-trend-tags em { display:inline-block; padding:4px 8px; border:1px solid #c4cfca; border-radius:999px; color:#536069; background:#fffdfa; font-size:11px; font-style:normal; line-height:1.35; white-space:nowrap; }
.testing-trend-tags em.is-positive { border-color:#a7d14a; color:#375a29; background:#ecf7cf; }
.testing-trend-chart { padding-top:14px; }
.testing-trend-chart h3 { margin:3px 0 12px; color:#071927; font:700 24px "Barlow Condensed", sans-serif; }
.testing-trend-chart svg { display:block; width:100%; height:auto; min-height:180px; }
.testing-trend-help { margin-top:14px; color:#65716d; font-size:12px; line-height:1.7; }
.testing-trend-help summary { padding-top:12px; color:#536069; font-weight:700; cursor:pointer; }
.testing-trend-protocol { margin:8px 0 0; }
@media (max-width:560px) { .test-datetime-row,.test-metrics-grid > div,.testing-trend-controls { grid-template-columns:1fr; } .testing-trend-performance { grid-template-columns:1fr; gap:8px; padding:15px; } .testing-trend-tags { justify-content:flex-start; } .test-detail-actions { flex-direction:column; } .testing-trends { padding:17px; } }

/* Date precision and measurement context stay local to objective testing. */
#testForm .test-datetime-row{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}
#testForm .test-datetime-row input,#testForm .test-datetime-row select{min-width:0;width:100%;min-height:44px;font-size:16px}
#testManualAgeField[hidden]{display:none}
#testManualAgeField{max-width:240px}
#testAgeHint{margin:0 0 12px;color:#64717d;font-size:12px;line-height:1.6}
#testForm .test-metrics-grid{padding:0;border:0}
#testForm .test-metrics-group{margin:0 0 22px}
#testForm .test-metrics-group legend{display:flex;align-items:baseline;gap:0;padding:0;color:#071927;font-size:18px;font-weight:800}
#testForm .test-metrics-group legend small{margin-left:5px;color:#7b878d;font-size:12px;font-weight:600}
#testForm .test-metrics-disclosure{padding:0}
#testForm .test-metrics-disclosure summary{display:flex;align-items:baseline;gap:0;padding:0;list-style:none;color:#071927;font-size:18px;font-weight:800;cursor:pointer}
#testForm .test-metrics-disclosure summary::-webkit-details-marker{display:none}
#testForm .test-metrics-disclosure summary small{margin-left:5px;color:#7b878d;font-size:12px;font-weight:600}
#testForm .test-metrics-disclosure summary::after{content:'▼';margin-left:auto;color:#64717d;font-size:12px;line-height:1;transition:transform .16s ease}
#testForm .test-metrics-disclosure[open] summary{margin-bottom:14px}
#testForm .test-metrics-disclosure[open] summary::after{transform:rotate(180deg)}
#testForm .test-metrics-disclosure summary:focus-visible{outline:2px solid #ff7041;outline-offset:4px;border-radius:4px}
#testForm .test-metrics-grid>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
#testForm .test-metrics-grid label,#testForm .test-catch-field{min-width:0;gap:6px;align-content:start}
#testForm .test-metrics-grid input{min-height:44px;font-size:16px}
#testForm .test-metrics-grid input::placeholder{font-size:12px;color:#94a0a3;opacity:1}
#testForm .test-metrics-grid label>span{min-width:0}
#testForm .test-metrics-grid select{flex:0 0 72px;width:72px;min-width:0;height:44px;padding:0 4px;font-size:12px}
#testForm .test-long-run-field{grid-column:1 / -1}
#testForm .test-long-run-field span{gap:6px}
#testForm .test-long-run-field select{flex:0 0 104px;width:104px}
#testForm .test-long-run-field input:not([type="hidden"]){flex:1 1 0;width:0;min-width:0}
#testLongRunSummary{display:block;margin-top:5px;color:#64717d;font-size:12px;line-height:1.5}
#testForm .test-catch-counts{display:flex;align-items:center;gap:5px;margin-top:6px}
#testForm .test-catch-counts input{min-width:0;flex:1;width:0}
#testForm .test-catch-counts>span{color:#64717d}
#testCatchRate{display:block;margin-top:5px;color:#64717d;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#testForm .test-conditions{margin:4px 0 0;border:0;border-bottom:1px solid #d7dfda}
#testForm .test-conditions summary{padding:12px 0;color:#536069;font-size:13px;line-height:1.6;cursor:pointer}
#testForm .test-conditions>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-bottom:12px}
#testForm .test-conditions label{min-width:0;font-size:13px}
#testForm .test-conditions input,#testForm .test-conditions select{width:100%;min-width:0;min-height:44px;font-size:14px}
#testForm .test-conditions p{font-size:12px;color:#64717d;line-height:1.65}
@media(max-width:560px){#testForm .test-metrics-grid>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:440px){#testForm .test-metrics-grid{padding:10px}#testForm .test-metrics-grid>div{gap:12px 10px}#testForm .test-metrics-grid select{width:62px;flex-basis:62px}#testForm .test-long-run-field span{display:grid;grid-template-columns:86px 1fr auto 1fr auto 1fr auto;gap:4px;align-items:center}#testForm .test-long-run-field select{width:86px;flex-basis:86px}#testForm .test-long-run-field input:not([type="hidden"]){width:100%}#testForm .test-metrics-grid label{font-size:12px}#testForm .test-conditions>div{grid-template-columns:1fr}}

/* Phase B: decimal values and composite timing stay legible on narrow phones. */
#testForm .test-metrics-grid label>span{min-width:0;line-height:1.4}
#testForm .test-metrics-grid input{font-size:16px;min-width:0}
#testForm .test-metrics-grid select{font-size:13px}
@media(max-width:390px){
  #testForm .test-metrics-grid>div{gap:12px 8px}
  #testForm .test-long-run-field span{grid-template-columns:80px minmax(34px,1fr) auto minmax(34px,1fr) auto minmax(34px,1fr) auto;gap:3px}
  #testForm .test-long-run-field select{width:80px;flex-basis:80px}
  #testForm .test-catch-counts{gap:4px}
}

/* A light chart surface must not inherit the dark analysis chart's palette. */
#testingTrends .chart-label{fill:var(--muted)}
#testingTrends .chart-grid{stroke:var(--line);stroke-width:1}
#testingTrends .chart-line{stroke:var(--ink);stroke-width:2.5}
#testingTrends .chart-dot{fill:var(--ink);stroke:var(--surface);stroke-width:2}
