/* The "تنظیم DNS" section (dns-guide.js). Colours come from style.css's
   tokens, so the dark theme needs nothing of its own here. */
#dns-guide h2{margin-top:0}
.guide-locked{background:var(--warning-bg);border:1px solid var(--warning-border);color:var(--warning-text);border-radius:12px;padding:10px 14px;font-size:14px}
.guide-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.guide-mode{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:right;padding:14px 18px;border-radius:14px;border:1px solid var(--border);background:var(--surface);color:var(--ink);cursor:pointer;font:inherit}
.guide-mode small{color:var(--muted);font-size:12px}
.guide-mode.selected{border-color:var(--primary);background:var(--mint);box-shadow:inset 0 0 0 1px var(--primary)}
.guide-fields{margin-bottom:8px}
.guide-fields>div{flex:1}
.guide-doh-head{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.guide-doh-head p{flex:1;min-width:220px;margin:0;font-size:14px;color:var(--muted)}
.guide-doh-head .tag{background:var(--ok-bg,var(--mint-deep));color:var(--ok,var(--teal))}
.guide-doh-head .btn{min-height:42px}
.guide-test-result:empty{display:none}
.guide-test-result{margin-top:12px;padding:10px 14px;border-radius:12px;font-size:14px;background:var(--mint)}
.guide-test-result.ok{background:var(--ok-bg);border:1px solid var(--ok-border)}
.guide-test-result.warn{background:var(--warning-bg);border:1px solid var(--warning-border);color:var(--warning-text)}
.guide-test-result.bad{background:var(--danger-bg);border:1px solid var(--danger-border)}
.guide-url{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding:14px 18px;border:1px solid var(--border);border-radius:14px;background:var(--mint)}
.guide-url>div{min-width:0}
.guide-url span{display:block;font-size:12px;color:var(--muted)}
.guide-url bdi{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:17px;color:var(--teal);font-weight:600;overflow-wrap:anywhere}
.guide-url .btn{min-height:42px;gap:8px;flex:none}
.guide-devices{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 18px;padding:6px;border:1px solid var(--border);border-radius:14px}
.guide-device{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:10px;border:0;background:none;color:var(--muted);font:inherit;font-size:14px;cursor:pointer}
.guide-device .icon{width:18px;height:18px}
.guide-device.selected{background:var(--ink);color:var(--bg)}
.guide-body{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:28px;align-items:start}
.guide-steps ol{counter-reset:step;list-style:none;margin:0;padding:0}
.guide-steps li{counter-increment:step;position:relative;padding-inline-start:44px;margin-bottom:14px;font-size:15px;line-height:2}
.guide-steps li:before{content:counter(step,persian);position:absolute;inset-inline-start:0;top:2px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--mint-deep);color:var(--teal);font-weight:700;font-size:14px;line-height:1}
.guide-steps pre{direction:ltr;text-align:left;background:var(--mint);border-radius:10px;padding:10px 12px;font-size:12px;overflow-x:auto;margin:8px 0 0;line-height:1.7}
.guide-value{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--teal);font-weight:600}
.guide-note{background:var(--mint);border-radius:12px;padding:10px 14px;font-size:14px}
.guide-after{font-size:13px;color:var(--muted)}
.guide-profile{margin-top:4px;gap:10px}
.guide-figure{margin:0}
.guide-figure figcaption{font-size:12px;color:var(--muted);text-align:center;margin-top:6px}
.guide-ip{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}

/* The drawings */
.guide-shot{display:block;width:100%;height:auto;font-family:-apple-system,"Segoe UI",Roboto,Vazirmatn,sans-serif}
.guide-shot.phone{max-width:250px;margin-inline:auto}
.guide-shot .g-bezel{fill:#1B2533}
.guide-shot .g-screen{fill:#F6F7F9}
.guide-shot .g-screen.tv{fill:#0f1f33}
.guide-shot .g-window{fill:var(--surface);stroke:var(--border);stroke-width:1.5}
.guide-shot .g-dot{fill:var(--border)}
.guide-shot .g-bar{fill:var(--mint)}
.guide-shot text{fill:#1B2533}
.guide-shot .g-small{font-size:10px;fill:#6A7B90}
.guide-shot .g-title{font-size:17px;font-weight:700}
.guide-shot .g-label{font-size:12px}
.guide-shot .g-value{font-size:12px;fill:#4F6178}
.guide-shot .g-row{fill:#fff;stroke:#E0E6EE}
.guide-shot .g-row.on{fill:#E5EFFA;stroke:#1F5FAD;stroke-width:2}
.guide-shot .g-value.on{fill:#1F5FAD;font-weight:700;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.guide-shot:has(.tv) text{fill:#e8eef6}
.guide-shot:has(.tv) .g-small,.guide-shot:has(.tv) .g-value{fill:#9fb3c8}
.guide-shot:has(.tv) .g-row{fill:#17304d;stroke:#24476d}
.guide-shot:has(.tv) .g-row.on{fill:#1d4e7a;stroke:#7DB8F5}
.guide-shot:has(.tv) .g-value.on{fill:#7DB8F5}
[data-theme="dark"] .guide-shot .g-window text{fill:var(--ink)}
[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) text{fill:var(--ink)}
[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) .g-small,[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) .g-value{fill:var(--muted)}
[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) .g-row{fill:var(--mint);stroke:var(--control-border)}
[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) .g-row.on{fill:var(--mint-deep);stroke:var(--primary)}
[data-theme="dark"] .guide-shot:not(:has(.tv)):not(.phone) .g-value.on{fill:var(--primary)}

@media(max-width:800px){
  .guide-modes{grid-template-columns:1fr}
  .guide-body{grid-template-columns:minmax(0,1fr)}
  .guide-figure{order:-1}
  .guide-url{flex-direction:column;align-items:stretch}
  .guide-devices{flex-wrap:nowrap;overflow-x:auto}
  .guide-device{flex:none}
}

/* A setup video in the shot's place (dns-guide.js videoFigure). */
.guide-video{display:block;width:100%;max-width:360px;height:auto;max-height:640px;margin-inline:auto;border-radius:18px;background:#0b1626;object-fit:contain}
.guide-video-figure figcaption{text-align:center}
