/* DIY Made Simple — diagnosis tutorial view. Uses the site's brand variables. */
.dx{--r-bg:#e8f6ee;--r-ink:#125c3a;--r-line:#bfe3cd;display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-width:0;animation:dxIn .4s ease both}
.dx.risk-caution{--r-bg:#fff5df;--r-ink:#7a5410;--r-line:#f0d49c}
.dx.risk-professional{--r-bg:#fff0e8;--r-ink:#9a3b12;--r-line:#f5c7ae}
.dx.risk-emergency{--r-bg:#fdeceb;--r-ink:#a3241a;--r-line:#f2b9b3}
@keyframes dxIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.dx h3,.dx h4,.dx h5{color:var(--navy);margin:0;letter-spacing:-.2px}
.dx .sub{margin:2px 0 10px;font-size:12px;color:var(--muted)}

/* Headline */
.dx-hero{background:linear-gradient(135deg,#edf6ff,#fff 70%);border:1px solid var(--line);border-radius:18px;padding:16px}
.dx-badge{display:inline-flex;align-items:center;gap:7px;background:var(--r-bg);color:var(--r-ink);border:1px solid var(--r-line);border-radius:99px;padding:5px 11px 5px 6px;font-size:12px;font-weight:900}
.dx-badge span{width:20px;height:20px;border-radius:50%;background:var(--r-ink);color:#fff;display:grid;place-items:center;font-size:11px}
.dx-hero h3{font-size:24px;line-height:1.15;margin:10px 0 6px}
.dx-summary{margin:0;font-size:15px;color:#334a60}
.dx-risk-note{margin:8px 0 0;font-size:13px;font-weight:750;color:var(--r-ink)}
.dx-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.dx-meta span{font-size:11px;background:#fff;border:1px solid var(--line);border-radius:99px;padding:4px 9px;color:#52677e}

/* Safety (always visible) */
.dx-safety{background:var(--r-bg);border:2px solid var(--r-line);border-radius:18px;padding:14px}
.dx-safety h4{font-size:16px;color:var(--r-ink);display:flex;gap:7px;align-items:center}
.dx-warn{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:7px}
.dx-warn li{display:flex;gap:9px;align-items:flex-start;background:#fff;border-radius:12px;padding:9px 11px;font-size:13px;color:#3b2f1c;line-height:1.4}
.dx-warn li.lvl-urgent{border-left:4px solid #c8372b;font-weight:650}
.dx-warn li.lvl-warning{border-left:4px solid #e3a13a}
.dx-warn li.lvl-info{border-left:4px solid var(--blue)}
.dx-warn .ic{flex:none;font-size:15px;line-height:1.25}
.dx-pro{display:flex;gap:11px;margin-top:10px;background:#fff;border:1px solid var(--r-line);border-radius:13px;padding:11px}
.dx-pro.is-required{border:2px solid var(--r-ink)}
.dx-pro-ic{flex:none;width:40px;height:40px;border-radius:12px;background:var(--r-bg);display:grid;place-items:center;font-size:22px}
.dx-pro-top{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.dx-pro-top strong{color:var(--navy);font-size:14px}
.dx-pro p{margin:3px 0 0;font-size:12.5px;color:#4d5f72}
.dx-urg{font-size:10.5px;font-weight:900;border-radius:99px;padding:2px 8px;background:#eaf3fb;color:var(--navy);text-transform:uppercase;letter-spacing:.5px}
.dx-urg.u-now{background:#c8372b;color:#fff}.dx-urg.u-soon{background:#f3b34a;color:#3b2a06}
.dx-stop{margin-top:10px;font-size:12.5px;color:#4a3a20}
.dx-stop strong{display:block;color:var(--r-ink);margin-bottom:4px}
.dx-stop ul{margin:0;padding-left:18px;display:grid;gap:2px}

/* Photo with suspected area */
.dx-photo{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}
.dx-photo-frame{position:relative;line-height:0;background:#0f2238}
.dx-photo-frame img{width:100%;height:auto;max-height:520px;object-fit:contain;display:block}
.dx-mark{position:absolute;border:3px solid #ffcf3f;border-radius:16px;box-shadow:0 0 0 2px rgba(18,52,90,.55),0 0 0 9999px rgba(10,25,45,.28);transition:opacity .25s;animation:dxPulse 2.2s ease-in-out infinite}
.dx-mark.hidden{opacity:0}
@keyframes dxPulse{50%{border-color:#fff1a8}}
.dx-mark-label{position:absolute;left:-3px;top:-30px;background:#ffcf3f;color:#1b2a3a;font-size:12px;font-weight:900;line-height:1;padding:6px 9px;border-radius:9px 9px 9px 2px;white-space:nowrap;box-shadow:0 2px 6px #0003}
.dx-photo-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 13px;font-size:12px;color:var(--muted)}
.dx-link{border:0;background:none;color:var(--blue);font-weight:850;cursor:pointer;padding:4px 0;font-size:12px}

/* Seen vs maybe */
.dx-split{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.dx>*,.dx-step.active>*{min-width:0}
.dx-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}
.dx-card h4{font-size:16px;display:flex;align-items:center;gap:8px}
.dx-h-ic{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;font-size:14px;font-weight:900}
.seen .dx-h-ic{background:#e8f6ee;color:var(--green)}
.maybe .dx-h-ic{background:#edf0ff;color:#4a52b5}
.dx-obs{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.dx-obs li{display:flex;gap:8px;font-size:13.5px;color:#334a60;align-items:flex-start}
.dx-obs .tick{flex:none;width:20px;height:20px;border-radius:50%;background:var(--green);color:#fff;font-size:11px;display:grid;place-items:center;margin-top:1px}
.dx-causes{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.dx-cause{border:1px dashed #c9d1ef;border-radius:12px;padding:9px 11px;background:#fafbff}
.dx-cause-top{display:flex;gap:8px;align-items:center}
.dx-cause-top strong{font-size:13.5px;color:var(--navy)}
.dx-cause .rank{flex:none;width:20px;height:20px;border-radius:50%;background:#e4e8fb;color:#4a52b5;font-size:11px;font-weight:900;display:grid;place-items:center}
.dx-meter{display:flex;align-items:center;gap:3px;margin:6px 0 0 28px}
.dx-meter i{width:18px;height:6px;border-radius:3px;background:#e1e5f3}
.dx-meter i.on{background:#6b73d6}
.dx-meter span{font-size:11px;font-weight:800;color:#5a62b8;margin-left:5px}
.dx-cause p{margin:5px 0 0 28px;font-size:12px;color:var(--muted)}

/* Tools */
.dx-tools,.dx-steps{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}
.dx-sec-head{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dx-sec-head h4{font-size:16px;display:flex;gap:7px;align-items:center}
.dx-tool-count,.dx-step-count{font-size:11px;font-weight:850;color:var(--blue);background:var(--pale);border-radius:99px;padding:3px 9px;white-space:nowrap}
.dx-tool-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dx-tool{position:relative;display:grid;grid-template-columns:44px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;text-align:left;border:1px solid var(--line);background:#f9fcff;border-radius:13px;padding:8px;cursor:pointer;color:var(--ink);transition:transform .12s,border-color .2s,background .2s}
.dx-tool:active{transform:scale(.97)}
.dx-tool-pic{grid-row:1/3;width:44px;height:44px;border-radius:11px;background:#e7f3ff;color:var(--navy);display:grid;place-items:center}
.dx-tool-pic svg{width:28px;height:28px}
.dx-tool-name{font-size:12.5px;font-weight:800;line-height:1.2;padding-right:16px;overflow-wrap:anywhere}
.dx-tool-meta{display:flex;flex-wrap:wrap;gap:3px 5px;font-size:11px;color:var(--muted)}
.dx-tool-meta b{color:var(--navy)}
.dx-tool-meta em{font-style:normal;background:#eef1f5;border-radius:6px;padding:0 5px}
.dx-tool-check{position:absolute;top:6px;right:6px;width:18px;height:18px;border-radius:50%;border:2px solid #c9d8e6;display:grid;place-items:center;font-size:10px;color:transparent}
.dx-tool[aria-pressed="true"]{border-color:#8fcfac;background:#f0faf4}
.dx-tool[aria-pressed="true"] .dx-tool-check{background:var(--green);border-color:var(--green);color:#fff}

/* Steps */
.dx-progress{margin:12px 0}
.dx-bar{height:8px;border-radius:99px;background:#e6eef6;overflow:hidden}
.dx-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--blue),#35b37a);border-radius:99px;transition:width .4s ease}
.dx-dots{display:flex;gap:6px;margin-top:9px;flex-wrap:wrap}
.dx-dot{width:30px;height:30px;border-radius:50%;border:2px solid #cfdeeb;background:#fff;color:#6a7d91;font-weight:900;font-size:12px;cursor:pointer;transition:all .2s}
.dx-dot.done{background:var(--green);border-color:var(--green);color:#fff}
.dx-dot.current{border-color:var(--blue);color:var(--blue);box-shadow:0 0 0 3px #1676c522}
.dx-dot.done.current{color:#fff}
.dx-viewport{position:relative}
.dx-step{display:none}
.dx-step.active{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;animation:dxStep .3s ease both}
@keyframes dxStep{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}
.dx-step-art{position:relative;border-radius:16px;overflow:hidden;border:1px solid var(--line)}
.dx-step-art .scene{display:block;width:100%;height:auto}
.dx-num{position:absolute;left:10px;top:10px;width:34px;height:34px;border-radius:11px;background:var(--navy);color:#fff;font-weight:950;display:grid;place-items:center;font-size:16px;z-index:2;box-shadow:0 3px 8px #12345a40}
.dx-ai-out:empty{display:none}
.dx-ai-out{position:absolute;inset:0;background:#fff;z-index:1}
.dx-ai-fig{margin:0;height:100%;position:relative}
.dx-ai-fig img{width:100%;height:100%;object-fit:contain;display:block;background:#fff}
.dx-ai-fig figcaption{position:absolute;left:0;right:0;bottom:0;background:rgba(18,52,90,.88);color:#fff;font-size:11px;padding:6px 10px;line-height:1.35}
.dx-ai-close{position:absolute;top:8px;right:8px;width:30px;height:30px;border-radius:50%;border:0;background:#fff;color:var(--navy);font-size:18px;font-weight:900;cursor:pointer;box-shadow:0 2px 6px #0003}
.dx-ai-loading{height:100%;display:grid;place-items:center;background:linear-gradient(110deg,#f3f8fd 30%,#e3eef9 50%,#f3f8fd 70%);background-size:200% 100%;animation:dxShimmer 1.3s linear infinite}
.dx-step-body h5{font-size:19px;line-height:1.2}
.dx-step-body p{margin:5px 0 0;font-size:15px;color:#334a60}
.dx-caution{display:flex;gap:7px;margin-top:9px;background:#fff5df;border:1px solid #f0d49c;color:#6a4d14;border-radius:11px;padding:8px 10px;font-size:12.5px;font-weight:650}
.dx-step-tools{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:11px}
.dx-step-tools .lbl{font-size:11px;font-weight:900;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;margin-right:2px}
.dx-chip{display:inline-flex;align-items:center;gap:5px;background:#eef6fd;border:1px solid #d6e7f5;border-radius:99px;padding:3px 9px 3px 5px;font-size:12px;font-weight:750;color:var(--navy)}
.dx-chip svg{width:16px;height:16px}
.dx-chip.none{padding:3px 9px;color:var(--muted);font-weight:650}
.dx-ai-btn{margin-top:12px;border:1px dashed #9cc4e6;background:#f6fbff;color:var(--blue);border-radius:11px;padding:9px 12px;font-weight:800;font-size:12.5px;cursor:pointer;width:100%}
.dx-ai-btn:disabled{opacity:.7;cursor:progress}
.dx-ai-err{margin:6px 0 0;font-size:12px;color:#a33}
.dx-finish{text-align:center;padding:20px 8px}
.dx-finish.active{display:block}
.dx-finish-ic{font-size:44px}
.dx-finish p{color:#334a60;font-size:14px;max-width:420px;margin:6px auto 8px}
.dx-nav{display:flex;justify-content:space-between;gap:10px;margin-top:14px}
.dx-nav .btn{flex:1;padding:13px 14px}
.dx-nav .btn.primary{flex:2}
.dx-art-note{margin:10px 0 0;font-size:11px;color:var(--muted);text-align:center}

/* Follow-up, details, footer */
.dx-follow{display:flex;gap:11px;background:#f4f7ff;border:1px solid #dde3fb;border-radius:18px;padding:14px}
.dx-follow-ic{font-size:24px}
.dx-follow strong{color:var(--navy)}
.dx-follow p{margin:3px 0 10px;font-size:13.5px;color:#334a60}
.dx-more{background:#fff;border:1px solid var(--line);border-radius:14px;padding:0 14px}
.dx-more summary{cursor:pointer;padding:13px 0;font-weight:850;color:var(--navy);font-size:14px;list-style:none;display:flex;justify-content:space-between}
.dx-more summary::-webkit-details-marker{display:none}
.dx-more summary::after{content:'+';font-size:18px;line-height:1;color:var(--blue)}
.dx-more[open] summary::after{content:'−'}
.dx-more p{margin:0 0 14px;font-size:13px;color:#4d5f72}
.dx-disclaimer{margin:0;font-size:11.5px;color:#5d6d80;background:#f0f5f9;border-radius:12px;padding:11px 13px}
.dx-cta{display:flex;justify-content:space-between;align-items:center;background:var(--navy);color:#fff;text-decoration:none;border-radius:16px;padding:14px 16px;font-size:20px}
.dx-cta strong{display:block;font-size:14px}
.dx-cta small{font-size:11px;color:#b9d3ee;letter-spacing:.4px}

/* Loading skeleton */
.dx-skel{display:grid;gap:12px;margin-top:16px}
.sk{border-radius:16px;background:linear-gradient(110deg,#eef3f8 30%,#f8fbfe 50%,#eef3f8 70%);background-size:200% 100%;animation:dxShimmer 1.3s linear infinite}
.sk-hero{height:110px}.sk-photo{height:220px}.sk-card{height:130px}.sk-step{height:200px}
.sk-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@keyframes dxShimmer{to{background-position:-200% 0}}
.dx-stages{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:6px}
.dx-stages li{display:flex;gap:8px;align-items:center;font-size:13px;color:#8a99aa;font-weight:700}
.dx-stages li::before{content:'';width:14px;height:14px;border-radius:50%;border:2px solid #cfdeeb;flex:none}
.dx-stages li.on{color:var(--blue)}
.dx-stages li.on::before{border-color:var(--blue);border-top-color:transparent;animation:spin .8s linear infinite}
.dx-stages li.ok{color:var(--green)}
.dx-stages li.ok::before{background:var(--green);border-color:var(--green)}

@media(min-width:720px){
  .dx-split{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dx-tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dx-step.active{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:center}
  .dx-hero h3{font-size:28px}
}
@media(prefers-reduced-motion:reduce){.dx,.dx-step.active,.dx-mark,.sk,.dx-ai-loading{animation:none}}
