/* XODNS subdomain layer — loads after ui/xcr9.css (same tokens as xodns.net).
   Maps the component classes the gateway pages and their JS still use
   (notebook-card, btn-sketch, tab-btn, code-block, Tailwind colour utilities…)
   onto the site design. Generated pages: subdomains/build_subdomains.py. */

.sub { padding-bottom: 24px; }
.sub > * + * { margin-top: 14px; }
.sub h2 { margin: 0 0 6px; font-size: clamp(20px, 3vw, 24px); line-height: 1.35; letter-spacing: -.01em; }
.sub h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.45; }
.sub h4 { margin: 0 0 4px; font-size: 15px; }
.sub p { margin: 0 0 12px; color: var(--muted); }
.sub p:last-child { margin-bottom: 0; }
.sub strong { color: var(--text); font-weight: 700; }
.sub ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--muted); font-size: 14.5px; }
.sub :not(pre) > code { font-family: var(--mono); font-size: .86em; direction: ltr; unicode-bidi: isolate; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.sub section > .notebook-card + .notebook-card { margin-top: 10px; }
.sub .bullets li { position: relative; padding-inline-start: 18px; }
.sub .bullets li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sub a.footer-link, .sub .notice-link { color: var(--text); border-bottom: 1px solid var(--accent); }
.sub a.footer-link:hover, .sub .notice-link:hover { color: var(--accent); }

/* ---------- brand + header extras ---------- */
.mark-sub { font-family: var(--mono); font-size: 13px; color: var(--muted); font-weight: 500; padding-inline-start: 10px; border-inline-start: 1px solid var(--line-strong); direction: ltr; unicode-bidi: isolate; }
@media (max-width: 420px) { .mark-sub { display: none; } }
.ping-pill { font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.ping-pill span { color: inherit !important; font-weight: 500 !important; font-family: inherit !important; }
.menu-btn[aria-expanded="true"] .icon-bars { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
.auth-cluster { display: flex; align-items: center; gap: 6px; }
.auth-cluster .who { font-size: 13px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) { .auth-cluster .who, .auth-cluster .opt { display: none !important; } }
@media (max-width: 480px) { .bar-actions .panel-btn { display: none; } }

/* ---------- hero ---------- */
.sub .page-hero { padding: 56px 0 18px; }
@media (min-width: 720px) { .sub .page-hero { padding: 88px 0 24px; } }
.hero-badge-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 18px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.sub .hero-title { margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: var(--text); }
.sub .page-hero h2.hero-title { font-size: clamp(26px, 4.4vw, 38px) !important; }
.handwritten-highlight { color: var(--accent); white-space: nowrap; }
.sub .hero-subtitle { margin: 16px 0 0; max-width: 640px; font-size: clamp(15px, 2vw, 17px); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-hero .cta-row { margin-top: 26px; }

/* ---------- buttons ---------- */
.btn-sketch { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; font-size: 15px; cursor: pointer; transition: transform .12s ease, background .15s, border-color .15s; white-space: nowrap; }
.btn-sketch:hover { border-color: var(--text); }
.btn-sketch:active { transform: scale(.98); }
.btn-sketch:disabled { opacity: .6; cursor: progress; }
.btn-sketch.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn-sketch.btn-primary:hover { filter: brightness(1.05); }
.btn-sketch.btn-yellow, .btn-sketch.btn-coral { background: transparent; }
.btn-sketch.btn-coral:hover { border-color: #ef4444; color: #ef4444; }
.btn-copy, .copy-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.btn-copy:hover, .copy-btn:hover { color: var(--text); border-color: var(--text); }
.copy-btn.copied { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.copy-btn svg { width: 14px; height: 14px; }

/* ---------- cards + grids ---------- */
.notebook-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: relative; }
@media (min-width: 720px) { .notebook-card.inner-card { padding: 28px; } }
.notebook-card .notebook-card { box-shadow: none; background: var(--surface-2); }
section.notebook-card.cta-row { justify-content: space-between; }
.feature-grid, .inner-grid-4, .inner-grid-3, .inner-grid-2, .flow-grid, .arch-grid, .hero-stats { display: grid; gap: 10px; }
.feature-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(6, 1fr); } }
.inner-grid-4, .flow-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 880px) { .inner-grid-4, .flow-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 760px) { .inner-grid-3 { grid-template-columns: repeat(3, 1fr); } .inner-grid-2, .arch-grid { grid-template-columns: 1fr 1fr; } }
.flow-grid { margin-top: 14px; counter-reset: flow; }
.feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-card strong { font-family: var(--mono); font-size: 14px; font-weight: 600; direction: ltr; text-align: right; unicode-bidi: isolate; overflow-wrap: anywhere; }
.feature-card span { font-size: 13px; color: var(--muted); }
.flow-grid .feature-card { counter-increment: flow; }
.flow-grid .feature-card::before { content: "0" counter(flow); font-family: var(--mono); font-size: 12px; color: var(--faint); }
.inner-grid-4 .feature-card::before, .feature-grid .feature-card::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); margin-bottom: 10px; }
.arch-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.arch-item p { font-size: 14px; }

/* ---------- forms ---------- */
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 8px; }
.sub input[type="text"], .sub input[type="password"], .sub input:not([type]) { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.sub input[dir="ltr"] { font-family: var(--mono); font-size: 14px; text-align: left; }
.sub input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sub .cta-row > input { flex: 1 1 220px; width: auto; }
.sandbox-grid { display: grid; gap: 18px; margin-top: 14px; }
@media (min-width: 900px) { .sandbox-grid { grid-template-columns: 1fr 1.1fr; } }

/* ---------- tabs ---------- */
.tabs-scroll-container, .tabs-header { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.tabs-scroll-container::-webkit-scrollbar, .tabs-header::-webkit-scrollbar { display: none; }
.tab-btn { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--text); color: var(--bg); font-weight: 500; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.desc { font-size: 15px; }
.feature-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); white-space: nowrap; }

/* ---------- url / note / code ---------- */
.url-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: 12px; margin: 16px 0 12px; }
.url-box .label { display: block; font-size: 13px; color: var(--muted); }
.url-box .value { display: block; font-size: 15px; font-weight: 600; word-break: break-all; }
#frameworkNote { font-size: 13px; color: var(--muted); max-width: 520px; }
.note-box { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.8; overflow-wrap: anywhere; }
.code-block { background: #0b0d10; color: #d7dde6; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; margin: 0 0 14px; }
.code-block:last-child { margin-bottom: 0; }
.code-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 12.5px; color: #8b929c; }
.code-header > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-block .btn-copy, .code-block .copy-btn { color: #d7dde6; border-color: rgba(255,255,255,.18); }
.code-block .btn-copy:hover, .code-block .copy-btn:hover { border-color: #d7dde6; }
.code-block .copy-btn.copied { color: #0d1200; background: #c6f432; border-color: transparent; }
.code-block pre { margin: 0; padding: 16px; max-height: 460px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; direction: ltr; text-align: left; white-space: pre; tab-size: 2; }
.code-block pre code { font: inherit; background: none; border: 0; padding: 0; color: inherit; }
.shield-out { margin-top: 14px; padding: 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line); }
.shield-out .mono, #shieldedKeyDisplay, #shieldedTokenDisplay { display: block; font-size: 13px; word-break: break-all; color: var(--text); }
#shieldStatusMsg:empty { display: none; }
#shieldStatusMsg { font-size: 13.5px; margin-top: 6px; }
#pingResult, #testResult { font-family: var(--mono); font-size: 13px; }

/* ---------- mirror.xodns.net ---------- */
.mirror-top-notice { font-size: 13.5px; color: var(--muted); text-align: center; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--surface); line-height: 1.7; }
.mirror-top-notice strong { color: var(--text); }
.mirror-top-notice .notice-link { color: var(--text); border-bottom: 1px solid var(--accent); }
.quickstart-banner { margin-top: 28px; overflow: hidden; }
#quickstartLockOverlay { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lock-overlay-title { font-weight: 700; font-size: 16px; }
.lock-overlay-desc { color: var(--muted); font-size: 14px; max-width: 440px; }
.lock-overlay-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.lock-glyph { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); }
.lock-glyph svg { width: 18px; height: 18px; }
.quickstart-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 17px; }
.quickstart-desc { color: var(--muted); font-size: 14.5px; margin: 6px 0 14px; }
.quickstart-command { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 12px; background: #0b0d10; color: #d7dde6; border: 1px solid var(--line-strong); }
.quickstart-command code { font-family: var(--mono); font-size: 13.5px; direction: ltr; text-align: left; overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 0; color: inherit; }
.quickstart-command .copy-btn { color: #d7dde6; border-color: rgba(255,255,255,.18); }
.hero-stats { margin-top: 14px; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .hero-stats { grid-template-columns: repeat(7, 1fr); } }
.stat-card { background: var(--surface); padding: 16px; min-width: 0; }
.stat-val { font-family: var(--mono); font-size: 20px; font-weight: 600; direction: ltr; text-align: right; letter-spacing: -.02em; }
.stat-val[style*="color"] { color: var(--accent) !important; }
.stat-val.pending { color: var(--faint); font-size: 14px; font-family: var(--sans); }
.stat-lbl { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.guide-section { padding-top: 26px; }

/* ---------- JS-injected Tailwind utilities ---------- */
.text-emerald-400, .text-emerald-300 { color: var(--accent) !important; }
.text-red-400, .text-rose-400 { color: #ef4444 !important; }
.text-amber-400, .text-yellow-400 { color: var(--warn) !important; }
.text-sky-400, .text-blue-300, .text-purple-300 { color: #38bdf8 !important; }
:root[data-theme="light"] .text-sky-400, :root[data-theme="light"] .text-blue-300, :root[data-theme="light"] .text-purple-300 { color: #0369a1 !important; }
.text-slate-300, .text-slate-400 { color: var(--muted) !important; }
.text-slate-500 { color: var(--faint) !important; }
.text-white { color: var(--text) !important; }
.code-block .text-white { color: #fff !important; }
.font-mono { font-family: var(--mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-xs, .text-\[11px\] { font-size: 12.5px; }
.mt-2 { margin-top: .5rem; }
.mb-1 { margin-bottom: .25rem; }
.pt-1 { padding-top: .25rem; }
.space-y-1 > * + * { margin-top: .25rem; }
.bg-slate-900 { background: var(--surface-2); border-radius: 6px; }
.px-1\.5 { padding-inline: .375rem; }
.py-0\.5 { padding-block: .125rem; }
.border-emerald-400, .border-rose-500 { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
.border-rose-500 { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
#testConsoleResult { font-size: 14px; }
#testConsoleResult code { color: var(--text); }

/* ---------- footer ---------- */
.foot-sub { margin-top: 14px; font-size: 13px; color: var(--faint); }

/* breadcrumb (mirrors the BreadcrumbList schema) */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 28px; font-size: 13px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); font-family: var(--mono); direction: ltr; unicode-bidi: isolate; }
.sub > .crumbs + .page-hero { padding-top: 28px; }
@media (min-width: 720px) { .sub > .crumbs + .page-hero { padding-top: 44px; } }
.sub > .crumbs + * { margin-top: 0; }
