/* ISA Device Test — standalone page, dark, Internet-SA green, mobile-first (16 px gutters,
   no horizontal scroll). The gauges are SVG, the graph a canvas; everything animates with
   transforms/opacity only. */
:root {
  --bg: #0f1117; --card: #171a23; --card-2: #1e2230; --line: #262b39;
  --text: #e8eaf0; --muted: #9aa3b8; --green: #a2ce4f; --green-dim: #5f7f2a; --green-glow: rgba(162, 206, 79, 0.35);
  --track: #262b39; --amber: #e3b341;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body.isa-dt-page { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
.isa-dt-header { padding: 20px 16px 8px; display: flex; justify-content: center; }
.isa-dt-logo { height: 52px; width: auto; max-width: 60vw; display: block; }
.isa-dt-main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 16px 24px; }
.isa-dt-footer { padding: 12px 16px 28px; text-align: center; color: var(--muted); font-size: 0.82rem; }

.isa-dt { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.isa-dt h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 0.6rem; font-weight: 700; letter-spacing: -0.01em; }
.isa-dt p { margin: 0 0 0.8rem; }
.isa-dt-note { color: var(--muted); font-size: 0.92rem; background: var(--card-2); border-radius: 10px; padding: 0.6rem 0.8rem; }
.isa-dt-small { color: var(--muted); font-size: 0.88rem; text-align: center; margin-top: 0.8rem; }
.isa-dt-opt { color: var(--muted); font-weight: 400; font-size: 0.9em; }

/* views fade/slide in */
.isa-dt-view { animation: isa-dt-in 0.35s ease-out both; }
@keyframes isa-dt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* questions */
.isa-dt-q { margin: 1rem 0; }
.isa-dt-q-label { font-weight: 600; margin-bottom: 0.45rem; }
.isa-dt-q-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.isa-dt-q-buttons button { flex: 1 1 auto; min-height: 48px; padding: 0.55rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); font: inherit; font-size: 1rem; color: var(--text); cursor: pointer; touch-action: manipulation; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.isa-dt-q-buttons button:active { transform: scale(0.98); }
.isa-dt-q-buttons button.sel { border-color: var(--green); background: rgba(162, 206, 79, 0.12); color: #fff; }
.isa-dt-start { margin-top: 1.1rem; width: 100%; min-height: 58px; padding: 0.9rem; font: inherit; font-size: 1.2rem; font-weight: 700; color: #10140a; background: var(--green); border: 0; border-radius: 14px; cursor: pointer; touch-action: manipulation; box-shadow: 0 6px 24px var(--green-glow); transition: transform 0.1s, box-shadow 0.2s; }
.isa-dt-start:active { transform: scale(0.985); box-shadow: 0 2px 10px var(--green-glow); }

/* running */
.isa-dt-phase { text-align: center; color: var(--muted); font-size: 0.95rem; min-height: 1.4rem; margin-bottom: 0.4rem; transition: color 0.3s; }
.isa-dt-phase.on { color: var(--green); }
.isa-dt-gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.isa-dt-gauge { position: relative; text-align: center; padding: 6px 2px 4px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); transition: border-color 0.3s, box-shadow 0.3s; }
.isa-dt-gauge.active { border-color: var(--green-dim); box-shadow: 0 0 0 1px var(--green-dim), 0 0 28px var(--green-glow); }
.isa-dt-gauge svg { width: 100%; height: auto; display: block; }
.isa-dt-gauge .g-track { fill: none; stroke: var(--track); stroke-width: 9; stroke-linecap: round; }
.isa-dt-gauge .g-fill { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 4px var(--green-glow)); }
.isa-dt-gauge .g-ticks text { fill: var(--muted); font-size: 6.5px; text-anchor: middle; dominant-baseline: middle; }
.isa-dt-gauge .g-needle { stroke: #fff; stroke-width: 2; stroke-linecap: round; transform-origin: 60px 60px; transition: none; }
.isa-dt-gauge .g-hub { fill: #fff; }
.isa-dt-gauge .g-num { position: absolute; left: 0; right: 0; top: 56%; font-size: 1.9rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.isa-dt-gauge .g-unit { position: absolute; left: 0; right: 0; top: 56%; margin-top: 2.1rem; font-size: 0.72rem; color: var(--muted); }
.isa-dt-gauge .g-label { margin-top: 2px; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.isa-dt-gauge.active .g-label { color: var(--green); }
.g-arrow { display: inline-block; font-weight: 700; }

.isa-dt-graph-wrap { margin-top: 10px; background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 4px; }
.isa-dt-graph { display: block; width: 100%; height: 96px; }
.isa-dt-graph-cap { font-size: 0.75rem; color: var(--muted); text-align: center; padding: 4px 0 2px; }

.isa-dt-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.isa-dt-tile { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.isa-dt-tile .t-num { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; transition: color 0.3s; }
.isa-dt-tile .t-num.warn { color: var(--amber); }
.isa-dt-tile .t-label { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.t-unit { opacity: 0.75; }

.isa-dt-bar { height: 6px; background: var(--track); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.isa-dt-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 4px; transition: width 0.4s ease-out; }

/* done */
.isa-dt-results { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 0.6rem 0 1rem; }
.isa-dt-result { background: var(--card-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 4px 10px; text-align: center; }
.isa-dt-result .r-num { font-size: 1.7rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -0.02em; }
.isa-dt-result .r-label { font-size: 0.74rem; color: var(--muted); margin-top: 4px; }
.isa-dt-line { font-size: 1rem; background: var(--card-2); border-left: 3px solid var(--green); border-radius: 10px; padding: 0.7rem 0.9rem; }

.isa-dt-expired { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 16px; text-align: center; color: var(--muted); }
.isa-dt-expired h1 { color: var(--text); margin: 0 0 0.5rem; font-size: 1.4rem; }

@media (min-width: 420px) {
  .isa-dt-gauge .g-num { font-size: 2.3rem; }
  .isa-dt-result .r-num { font-size: 2rem; }
}
@media (min-width: 600px) {
  .isa-dt { padding: 28px 28px; }
  .isa-dt-q-buttons button { flex: 0 1 auto; }
  .isa-dt-gauges { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .isa-dt-view { animation: none; }
  .isa-dt-bar i, .isa-dt-q-buttons button, .isa-dt-gauge { transition: none; }
}

/* ── 1.3.0: the report link page ── */
.isa-dt h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.isa-rp-open { display: block; text-align: center; text-decoration: none; margin-top: 0.6rem; }
.isa-rp-rate { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.isa-rp-faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0.6rem 0 0.4rem; }
.isa-rp-faces button { background: var(--card-2); border: 2px solid var(--line); border-radius: 14px; padding: 10px 2px 8px; color: var(--muted); font: inherit; cursor: pointer; touch-action: manipulation; transition: border-color 0.15s, transform 0.1s, background 0.15s; min-height: 72px; }
.isa-rp-faces button .face { display: block; font-size: 1.9rem; line-height: 1.1; }
.isa-rp-faces button .word { display: block; font-size: 0.72rem; margin-top: 4px; }
.isa-rp-faces button:active { transform: scale(0.96); }
.isa-rp-faces button.sel { border-color: var(--green); background: rgba(162, 206, 79, 0.14); color: #fff; }
.isa-rp-faces button:disabled:not(.sel) { opacity: 0.45; cursor: default; }
.isa-rp-thanks { margin-top: 0.8rem; }
.isa-rp-thanks-line { color: var(--green); font-weight: 600; }
.isa-rp-input { width: 100%; min-height: 46px; padding: 0.5rem 0.8rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--text); font: inherit; font-size: 1rem; margin-bottom: 0.5rem; }
.isa-rp-send { margin-top: 0; min-height: 48px; font-size: 1.05rem; }
@media (max-width: 380px) { .isa-rp-faces button .face { font-size: 1.6rem; } .isa-rp-faces button .word { font-size: 0.66rem; } }

/* ── 1.5.0: two questions (call faces, "Was the problem solved?" words) ── */
.isa-rp-q { margin-top: 1rem; }
.isa-rp-q .isa-dt-q-label { margin: 0 0 0.2rem; }
.isa-rp-hint + .isa-rp-q { margin-top: 0.6rem; }
.isa-rp-solved { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0.6rem 0 0.4rem; }
.isa-rp-solved button { background: var(--card-2); border: 2px solid var(--line); border-radius: 14px; padding: 10px 4px; color: var(--muted); font: inherit; font-size: 1.02rem; font-weight: 600; cursor: pointer; touch-action: manipulation; transition: border-color 0.15s, transform 0.1s, background 0.15s; min-height: 56px; }
.isa-rp-solved button:active { transform: scale(0.96); }
.isa-rp-solved button.sel { border-color: var(--green); background: rgba(162, 206, 79, 0.14); color: #fff; }
.isa-rp-solved button:disabled { cursor: default; }
.isa-rp-solved button:disabled:not(.sel) { opacity: 0.45; }
.isa-rp-faces button:disabled { cursor: default; }
.isa-rp-thanks .isa-dt-q-label { display: block; }
#isa-rp-thanks { margin: 0.8rem 0 0; }
@media (prefers-reduced-motion: reduce) { .isa-rp-faces button, .isa-rp-solved button { transition: none; } }
