/*
Theme Name: Scaffold
Theme URI: https://example.com/scaffold
Author: Scaffold
Description: A clean, simple home for a Discord server template library. Needs the Scaffold Core plugin (templates, categories, Discord login, one-click apply, SEO). Edit the front page in Appearance → Customize.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scaffold
*/

:root {
	--bg: #13161c;
	--bg2: #171b22;
	--surface: #1b2029;
	--surface2: #232937;
	--line: #2b3240;
	--text: #eef0f5;
	--muted: #98a1b3;
	--accent: #5865f2;
	--accent-ink: #ffffff;
	--accent2: #8b9bff;
	--ok: #3ddc97;
	--danger: #ff5d6c;
	--radius: 14px;
	--font: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent2); }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .65em 1.15em; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { background: #2c3445; border-color: #3a4358; color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); border-color: var(--accent); color: var(--accent-ink); }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #6b77f5; border-color: #6b77f5; color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .42em .85em; font-size: .86rem; border-radius: 9px; }
.btn-lg { padding: .85em 1.5em; font-size: 1.02rem; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.block-btn { display: flex; width: 100%; margin-bottom: 10px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(19,22,28,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.15rem; color: var(--text); }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.brand:hover { color: var(--text); }
.custom-logo-link img { max-height: 38px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav a { display: block; padding: .45em .8em; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .93rem; }
.nav a:hover, .nav .current-menu-item a { color: var(--text); background: var(--surface); }
.spacer { flex: 1; }
.header-search input { width: 210px; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: .5em .85em; font: inherit; font-size: .9rem; }
.header-search input::placeholder { color: var(--muted); }
.user { position: relative; }
.user summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.user summary::-webkit-details-marker { display: none; }
.user img { width: 30px; height: 30px; border-radius: 50%; display: block; }
.user .uname { font-weight: 600; font-size: .88rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 44px rgba(0,0,0,.5); }
.user-menu a { display: block; padding: .5em .8em; border-radius: 8px; font-size: .9rem; color: var(--text); }
.user-menu a:hover { background: var(--surface2); color: var(--text); }
.notice { background: #2a1519; border-bottom: 1px solid #5a2630; color: #ffc9cf; padding: 10px 0; font-size: .92rem; }

/* Hero (kept plain) */
.hero { padding: 76px 0 56px; text-align: center; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.hero .wrap { max-width: 800px; }
.eyebrow { display: inline-block; padding: .3em .9em; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 600; margin-bottom: 18px; }
.hero h1 { margin-bottom: 14px; }
.hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 26px; }
.hero-search { display: flex; gap: 10px; max-width: 540px; margin: 0 auto 18px; }
.hero-search input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: .85em 1.05em; font: inherit; }
.hero-search input:focus { border-color: var(--accent2); outline: none; }

/* Sections */
.section { padding: 52px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head .more { color: var(--muted); font-weight: 600; font-size: .92rem; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cat-tile:hover { border-color: var(--accent); color: var(--text); }
.cat-tile .ci { font-size: 1.35rem; width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface2); border-radius: 10px; }
.cat-tile b { display: block; font-size: .95rem; }
.cat-tile .n { color: var(--muted); font-size: .8rem; }

/* Cards (flat, like a list item) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .12s; }
.card:hover { border-color: #3a4358; }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--c, var(--accent)) 22%, var(--surface2)); border-radius: 12px; }
.card h3 { margin: 0; font-size: 1.02rem; }
.card h3 a:hover { color: var(--text); }
.card .tag { color: var(--muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: .12em .65em; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); color: var(--muted); font-size: .76rem; font-weight: 600; }
a.chip:hover { color: var(--text); border-color: #3a4358; }
.stats { display: flex; gap: 14px; color: var(--muted); font-size: .82rem; margin-top: auto; }
.stats b { color: var(--text); }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }

/* Listing pages */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 8px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin: 18px 0 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: .35em .9em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .86rem; font-weight: 600; }
.pill:hover { color: var(--text); border-color: #3a4358; }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sort { display: flex; gap: 4px; align-items: center; color: var(--muted); font-size: .86rem; }
.sort a { padding: .28em .7em; border-radius: 8px; font-weight: 600; }
.sort a.on { background: var(--surface2); color: var(--text); }
.search-row { display: flex; gap: 10px; max-width: 480px; }
.search-row input { flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: .6em .95em; font: inherit; }
.pagination { margin: 36px 0 0; }
.pagination .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers { padding: .45em .9em; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Home sections */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; list-style: none; counter-reset: s; }
.step { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; margin-bottom: 12px; }
.step p { color: var(--muted); margin: 0; font-size: .94rem; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--muted); }
.prose { color: #cfd4e0; max-width: 760px; }
.prose.wide { max-width: 860px; }
.prose a { color: var(--accent2); text-decoration: underline; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.cta { margin: 56px 0 0; padding: 32px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta h2 { margin: 0 0 4px; }
.cta p { margin: 0; color: var(--muted); }

/* Single template */
.crumbs { padding: 22px 0 0; color: var(--muted); font-size: .86rem; }
.crumbs a:hover { color: var(--text); }
.t-head { display: flex; gap: 18px; align-items: center; padding: 18px 0 6px; }
.t-icon { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; font-size: 2.3rem; background: color-mix(in srgb, var(--c, var(--accent)) 25%, var(--surface2)); border: 1px solid var(--line); flex: none; }
.t-main h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: 6px; }
.t-main .h1-sub { display: block; font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.t-main .tag { color: var(--muted); font-size: 1.02rem; margin-bottom: 10px; max-width: 640px; }
.t-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; margin-top: 8px; }
.t-side { position: sticky; top: 82px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.facts { margin: 8px 0 0; }
.facts div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.block { margin-top: 36px; }
.block > h2 { font-size: 1.3rem; }
.struct { display: grid; gap: 18px; }
.s-cat h3 { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.s-cat ul { list-style: none; display: grid; gap: 4px; }
.s-cat li { display: flex; gap: 8px; align-items: baseline; font-size: .95rem; }
.s-cat .ci { width: 1.3em; text-align: center; color: var(--muted); flex: none; }
.s-cat .nm { font-weight: 600; }
.s-cat .tp { color: var(--muted); font-size: .88rem; }
.role-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.role { display: inline-flex; align-items: center; gap: 8px; padding: .3em .8em; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; }
.role i { width: 11px; height: 11px; border-radius: 50%; background: var(--rc, #99aab5); display: block; }
.role small { color: var(--muted); font-weight: 500; }
.plain-steps { padding-left: 1.2em; color: #cfd4e0; }
.plain-steps li { margin: 6px 0; }
.dm-wrap { position: relative; }

/* Footer */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); padding: 40px 0 28px; color: var(--muted); font-size: .92rem; background: var(--bg2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--text); }
.foot-base { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot-base small { max-width: 560px; }

@media (max-width: 900px) {
	.t-layout { grid-template-columns: 1fr; }
	.t-side { position: static; order: -1; }
	.foot-grid { grid-template-columns: 1fr 1fr; }
	.foot-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.nav, .header-search { display: none; }
	.hero { padding: 52px 0 40px; }
	.hero-search { flex-direction: column; }
	.t-head { align-items: flex-start; }
	.user .uname { display: none; }
	.cta { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Discord-style preview mock */
.dm {
	display: grid; grid-template-columns: 64px 240px minmax(0, 1fr) 224px; height: 580px;
	background: #313338; border: 1px solid #1e1f22; border-radius: 16px; overflow: hidden;
	font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #dbdee1; font-size: 15px; line-height: 1.4;
	box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.dm * { box-sizing: border-box; }
.dm button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dm-rail { background: #1e1f22; padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: hidden; }
.dm-srv { width: 44px; height: 44px; border-radius: 50%; background: #313338; display: grid; place-items: center; font-size: 1.3rem; }
.dm-srv.me { border-radius: 14px; background: var(--accent); position: relative; }
.dm-srv.me::before { content: ""; position: absolute; left: -10px; top: 10px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: #fff; }
.dm-srv.ghost { opacity: .5; font-size: .9rem; font-weight: 700; }
.dm-sep { width: 28px; height: 2px; background: #35363c; border-radius: 1px; }
.dm-side { background: #2b2d31; display: flex; flex-direction: column; min-height: 0; }
.dm-sname { padding: 0 16px; height: 48px; display: flex; align-items: center; font-weight: 700; border-bottom: 1px solid #1f2023; box-shadow: 0 1px 0 rgba(0,0,0,.2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-tree { flex: 1; overflow-y: auto; padding: 10px 8px 16px; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
.dm-cat-h { display: flex; align-items: center; gap: 4px; width: 100%; padding: 14px 4px 4px; color: #949ba4; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.dm-cat-h:hover { color: #dbdee1; }
.dm-cat-h svg { width: 12px; height: 12px; transition: transform .15s; flex: none; }
.dm-cat.closed .dm-cat-h svg { transform: rotate(-90deg); }
.dm-cat.closed .dm-chs { display: none; }
.dm-lock { display: inline-flex; margin-left: auto; opacity: .7; }
.dm-lock svg { width: 12px; height: 12px; transform: none !important; }
.dm-ch { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border-radius: 4px; color: #949ba4; font-weight: 500; }
.dm-ch svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.dm-ch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-ch:hover { background: #35373c; color: #dbdee1; }
.dm-ch.on { background: #404249; color: #fff; }
.dm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dm-top { height: 48px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid #26272b; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.dm-top svg { width: 22px; height: 22px; color: #80848e; flex: none; }
.dm-top b { color: #fff; font-weight: 700; }
.dm-top .topic { color: #949ba4; font-size: 14px; padding-left: 10px; border-left: 1px solid #4e5058; margin-left: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-msgs { flex: 1; overflow-y: auto; padding: 16px 0 12px; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
.dm-intro { padding: 0 16px 16px; }
.dm-intro .big { width: 68px; height: 68px; border-radius: 50%; background: #41434a; display: grid; place-items: center; margin-bottom: 8px; color: #fff; }
.dm-intro .big svg { width: 40px; height: 40px; }
.dm-intro h4 { font-size: 28px; margin: 0 0 4px; color: #fff; letter-spacing: -0.01em; }
.dm-intro p { margin: 0; color: #b5bac1; font-size: 15px; }
.dm-msg { display: flex; gap: 14px; padding: 4px 16px; margin-top: 12px; }
.dm-msg:hover { background: #2e3035; }
.dm-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px; background: var(--c, #5865f2); }
.dm-mb { min-width: 0; }
.dm-mh { display: flex; align-items: baseline; gap: 8px; }
.dm-mh .n { font-weight: 600; color: var(--c, #fff); }
.dm-mh .bot { background: #5865f2; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; transform: translateY(-1px); }
.dm-mh .t { color: #949ba4; font-size: 12px; }
.dm-mt { color: #dbdee1; overflow-wrap: anywhere; }
.dm-embed { margin-top: 6px; max-width: 460px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px; padding: 10px 14px; }
.dm-embed b { display: block; color: #fff; margin-bottom: 4px; }
.dm-embed ol { margin: 0; padding-left: 20px; color: #dbdee1; font-size: 14px; }
.dm-embed li { margin: 2px 0; }
.dm-input { margin: 0 16px 20px; padding: 11px 16px; border-radius: 8px; background: #383a40; color: #6d6f78; flex: none; user-select: none; }
.dm-voice { padding: 20px 16px; }
.dm-voice .vrow { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: #2b2d31; margin-bottom: 8px; max-width: 360px; }
.dm-voice .dm-av { width: 32px; height: 32px; font-size: 13px; box-shadow: 0 0 0 2px #23a55a; }
.dm-voice .vnote { color: #949ba4; margin: 12px 0 0; font-size: 14px; }
.dm-forum { padding: 16px; display: grid; gap: 10px; }
.dm-post { background: #2b2d31; border: 1px solid #3a3c42; border-radius: 8px; padding: 12px 14px; max-width: 560px; }
.dm-post b { color: #fff; display: block; }
.dm-post span { color: #949ba4; font-size: 13px; }
.dm-members { background: #2b2d31; padding: 16px 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #1a1b1e transparent; }
.dm-mg { padding: 16px 8px 4px; color: #949ba4; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.dm-mg:first-child { padding-top: 0; }
.dm-mem { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 4px; color: var(--c, #949ba4); font-weight: 500; }
.dm-mem:hover { background: #35373c; }
.dm-mem .dm-av { width: 32px; height: 32px; font-size: 13px; }
.dm-wrap { position: relative; }
.preview-hint { color: var(--muted); font-size: .9rem; margin: -4px 0 16px; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(4,5,8,.78); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.dialog { position: relative; width: min(1100px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.dialog.narrow { width: min(520px, 100%); }
.dialog .close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; z-index: 3; }
.dialog h2 { font-size: 1.5rem; margin-right: 44px; }
.dlg-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; margin-right: 44px; }
.dlg-head .t-icon { width: 54px; height: 54px; font-size: 1.7rem; border-radius: 16px; }
.dlg-head h2 { margin: 0; }
.dlg-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.dialog .dm { height: 520px; }
.loading { padding: 48px; text-align: center; color: var(--muted); }
.srv-list { display: grid; gap: 8px; margin: 16px 0; max-height: 340px; overflow-y: auto; }
.srv { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.srv img, .srv .si { width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-weight: 700; flex: none; }
.srv .nm { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 10px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 18px 0 8px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .25s; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: .92rem; margin: 12px 0; border: 1px solid var(--line); background: var(--surface); }
.alert.err { background: #2a1519; border-color: #5a2630; color: #ffc9cf; }
.alert.ok { background: #10241b; border-color: #1f5139; color: #b6f0d3; }
.alert.warn { background: #2a2312; border-color: #5a4a1d; color: #f5deaa; }
.notes { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .88rem; }

/* Prose pages */
.page-content { padding: 54px 0 20px; max-width: 780px; }
.page-content h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-content .prose { max-width: none; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Apply modes */
.btn-danger { background: var(--danger); border-color: var(--danger); color: #1a0508; }
.btn-danger:hover { background: #ff7b88; border-color: #ff7b88; color: #1a0508; }
.mode { display: grid; gap: 8px; margin: 14px 0; }
.mode label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: .92rem; }
.mode input { margin-top: 3px; accent-color: var(--accent); }
.confirm-input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: .7em 1em; font: inherit; }
.confirm-input:focus { border-color: var(--danger); outline: none; }

/* Layout safety + responsive Discord preview */
.t-layout, .t-col { min-width: 0; }
.dm-wrap { max-width: 100%; }
@media (max-width: 1020px) {
	.dm { grid-template-columns: 56px 220px minmax(0, 1fr); }
	.dm-members { display: none; }
}
@media (max-width: 900px) {
	.t-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
	.dm { grid-template-columns: 1fr; grid-template-rows: 210px minmax(0, 1fr); height: 640px; }
	.dm-rail { display: none; }
	.dm-side { border-bottom: 1px solid #1f2023; }
	.dialog { padding: 16px; border-radius: 18px; }
	.dialog .dm { height: 560px; }
}

/* ---- Compact, basic look: smaller type everywhere ---- */
body { font-size: 14.5px; line-height: 1.55; }
h1 { font-size: clamp(1.55rem, 3.6vw, 2.15rem); }
h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
h3 { font-size: .95rem; }
.hero { padding: 52px 0 40px; }
.hero .lead { font-size: .98rem; margin-bottom: 20px; }
.hero-search input { padding: .7em .95em; font-size: .92rem; }
.eyebrow { font-size: .76rem; margin-bottom: 14px; }
.section { padding: 36px 0 0; }
.section-head { margin-bottom: 14px; }
.section-head .more { font-size: .84rem; }
.btn { font-size: .86rem; padding: .55em 1em; }
.btn-lg { font-size: .95rem; padding: .75em 1.3em; }
.btn-sm { font-size: .8rem; padding: .38em .75em; }
.nav a { font-size: .86rem; }
.brand { font-size: 1.02rem; }
.brand svg { width: 22px; height: 22px; }
.site-header .wrap { min-height: 54px; }
.header-search input { font-size: .84rem; width: 190px; }
.cat-tile { padding: 9px 12px; }
.cat-tile .ci { width: 32px; height: 32px; font-size: 1.1rem; }
.cat-tile b { font-size: .86rem; }
.cat-tile .n { font-size: .74rem; }
.card { padding: 14px; gap: 8px; }
.card-icon { width: 38px; height: 38px; font-size: 1.25rem; border-radius: 10px; }
.card h3 { font-size: .92rem; }
.card .tag { font-size: .8rem; }
.chip { font-size: .7rem; }
.stats { font-size: .74rem; }
.pill { font-size: .78rem; }
.sort { font-size: .78rem; }
.page-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.crumbs { font-size: .78rem; padding-top: 16px; }
.t-icon { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 16px; }
.t-main h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
.t-main .h1-sub { font-size: .78rem; }
.t-main .tag { font-size: .9rem; }
.t-layout { gap: 28px; }
.t-layout { grid-template-columns: minmax(0, 1fr) 280px; }
@media (max-width: 900px) { .t-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.panel { padding: 14px; }
.facts div { font-size: .82rem; padding: 8px 0; }
.block { margin-top: 28px; }
.block > h2 { font-size: 1.05rem; }
.step h3 { font-size: .92rem; }
.step p, .faq details p { font-size: .86rem; }
.faq summary { font-size: .9rem; padding: 12px 14px; }
.prose { font-size: .92rem; }
.cta { padding: 24px; margin-top: 40px; }
.site-footer { font-size: .84rem; margin-top: 56px; }

/* ---- "What you get": channels on the left, roles on the right, in one box ---- */
.what { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.what-col { padding: 14px 16px; min-width: 0; }
.what-col + .what-col { border-left: 1px solid var(--line); }
.what-h { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.s-cat { margin-bottom: 12px; }
.s-cat h4 { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin: 0 0 4px; font-weight: 700; }
.s-cat ul { list-style: none; display: grid; gap: 1px; padding: 0; }
.s-cat li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: .84rem; line-height: 1.45; }
.s-cat .ci { width: 1.2em; text-align: center; color: var(--muted); flex: none; }
.s-cat .nm { font-weight: 500; }
.s-cat .tp { flex-basis: 100%; padding-left: 1.7em; color: var(--muted); font-size: .74rem; }
.role-list { list-style: none; display: grid; gap: 2px; padding: 0; }
.role { display: flex; align-items: center; gap: 8px; padding: 3px 0; background: none; border: 0; border-radius: 0; font-size: .84rem; font-weight: 500; }
.role i { width: 9px; height: 9px; border-radius: 50%; background: var(--rc, #99aab5); flex: none; }
.role .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role small { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--muted); font-weight: 400; white-space: nowrap; }
@media (max-width: 700px) {
	.what { grid-template-columns: minmax(0, 1fr); }
	.what-col + .what-col { border-left: 0; border-top: 1px solid var(--line); }
}

/* =====================================================================
   Polish pass: 3D hero, richer surfaces, proper mobile layout
   ===================================================================== */
body {
	background:
		radial-gradient(900px 500px at 85% -10%, rgba(88,101,242,.10), transparent 60%),
		radial-gradient(700px 420px at -5% 30%, rgba(139,155,255,.05), transparent 60%),
		var(--bg);
	background-attachment: fixed;
	overflow-x: hidden;
}
h1, h2, h3 { letter-spacing: -0.025em; }

/* Buttons */
.btn-primary { background: linear-gradient(180deg, #6571ff, #4c58e6); border-color: #5865f2; box-shadow: 0 6px 18px -6px rgba(88,101,242,.7), inset 0 1px 0 rgba(255,255,255,.18); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn-primary:hover { background: linear-gradient(180deg, #7480ff, #5360f0); transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(88,101,242,.85), inset 0 1px 0 rgba(255,255,255,.22); filter: none; }
.btn-primary:active { transform: translateY(0); }
.btn-discord { box-shadow: 0 4px 14px -6px rgba(88,101,242,.8); }

/* Header */
.site-header { background: rgba(19,22,28,.78); }
.brand { min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head-menu { display: contents; }
.nav-toggle { display: none; width: 40px; height: 40px; flex: none; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.nav-toggle path { transition: transform .2s, opacity .2s; transform-origin: 12px 12px; }
.menu-open .nav-toggle .b1 { transform: translateY(5px) rotate(45deg); }
.menu-open .nav-toggle .b2 { opacity: 0; }
.menu-open .nav-toggle .b3 { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Hero: interactive 3D network ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 0; padding: 88px 0 72px; background: radial-gradient(1000px 520px at 50% 0%, #1a1f2e, var(--bg) 70%); touch-action: pan-y; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-glow { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(560px 300px at 50% 42%, rgba(88,101,242,.22), transparent 70%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent, var(--bg)); }
.hero-in { position: relative; z-index: 2; pointer-events: none; max-width: 860px; }
.hero-in a, .hero-in input, .hero-in button, .hero-in form { pointer-events: auto; }
.hero h1 { font-size: clamp(2rem, 6.2vw, 3.6rem); line-height: 1.08; letter-spacing: -0.035em; background: linear-gradient(180deg, #ffffff 30%, #b9c1ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-wrap: balance; filter: drop-shadow(0 6px 30px rgba(88,101,242,.35)); }
.hero .lead { font-size: clamp(.95rem, 2.4vw, 1.08rem); max-width: 600px; }
.eyebrow { background: rgba(27,32,41,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-search { max-width: 580px; padding: 6px; border-radius: 16px; background: rgba(27,32,41,.72); border: 1px solid #343c4d; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 50px -20px rgba(0,0,0,.7), 0 0 0 0 rgba(88,101,242,0); transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 20px 50px -20px rgba(0,0,0,.7), 0 0 0 4px rgba(88,101,242,.22); }
.hero-search input { background: transparent; border: 0; border-radius: 10px; padding: .75em .9em; }
.hero-search input:focus { border: 0; outline: none; }
.hero-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 22px; max-width: 620px; }
.hero-tag { padding: .32em .95em; border-radius: 999px; font-size: .8rem; font-weight: 600; color: #aab4ff; border: 1px solid rgba(139,155,255,.35); background: rgba(88,101,242,.08); transition: background .15s, border-color .15s, color .15s, transform .15s; }
.hero-tag:hover { color: #fff; background: rgba(88,101,242,.3); border-color: var(--accent2); transform: translateY(-1px); }
.hero-tag.more { color: var(--ok); border-color: rgba(61,220,151,.4); background: rgba(61,220,151,.07); }
.hero-tag.more:hover { background: rgba(61,220,151,.2); border-color: var(--ok); }
.hero-cta { margin: 0; }

/* Cards, tiles: cursor spotlight */
.card { position: relative; overflow: hidden; background: linear-gradient(180deg, #1d222c, var(--surface)); transition: border-color .15s, transform .15s, box-shadow .15s; }
.card::before, .cat-tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(139,155,255,.16), transparent 65%); }
.card:hover::before, .cat-tile:hover::before { opacity: 1; }
.card:hover { border-color: rgba(139,155,255,.45); transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(88,101,242,.6); }
.card > * { position: relative; }
.cat-tile { position: relative; overflow: hidden; transition: border-color .15s, transform .15s; }
.cat-tile:hover { transform: translateY(-2px); }
.cat-tile > * { position: relative; }
.section-head h2 { font-size: 1.2rem; }
.panel { background: linear-gradient(180deg, #1d222c, var(--surface)); }
.btn-pair { display: grid; gap: 0; }
.btn-pair .block-btn:only-child { grid-column: 1 / -1; }
.cta { background: radial-gradient(600px 220px at 100% 0%, rgba(88,101,242,.22), transparent 70%), var(--surface); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.t-side { position: static; order: -1; margin-top: 20px; }
	.btn-pair { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
	.btn-pair .block-btn { margin-bottom: 0; }
	.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; }
	.t-col > .block:first-child { margin-top: 28px; }
}
@media (max-width: 760px) {
	.wrap { width: min(1140px, 100% - 32px); }
	body { font-size: 15px; }
	.site-header .wrap { gap: 10px; min-height: 58px; }
	.brand { max-width: calc(100% - 170px); }
	.hide-sm { display: none; }
	.btn-discord, .user { margin-left: auto; }
	.nav-toggle { display: grid; }
	.head-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px 18px; background: rgba(19,22,28,.98); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(0,0,0,.7); }
	.site-header.menu-open .head-menu { display: flex; }
	.site-header .head-menu .nav { display: flex; flex-direction: column; gap: 2px; }
	.site-header .head-menu .nav a { padding: .7em .8em; font-size: .98rem; }
	.site-header .head-menu .spacer { display: none; }
	.site-header .head-menu .header-search { display: block; }
	.header-search input { width: 100%; font-size: 16px; padding: .7em .9em; }
	.user-menu { right: -48px; }

	.hero { padding: 56px 0 56px; }
	.hero-search { flex-direction: row; gap: 6px; padding: 5px; }
	.hero-search input { font-size: 16px; padding: .7em .75em; }
	.hero-search .btn { padding: .6em 1.1em; }
	.hero-tags { gap: 6px; margin-bottom: 18px; }
	.hero-tag { font-size: .76rem; padding: .3em .8em; }
	.eyebrow { font-size: .72rem; }

	.cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.cat-tile { padding: 9px 10px; gap: 9px; }
	.cat-tile b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.section { padding-top: 30px; }
	.section-head { align-items: center; }

	.crumbs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.t-head { gap: 14px; }
	.t-icon { width: 52px; height: 52px; font-size: 1.6rem; border-radius: 14px; }
	.t-main { min-width: 0; }
	.t-main h1 { font-size: 1.45rem; overflow-wrap: anywhere; }
	.t-main .h1-sub { font-size: .74rem; }
	.what-col { padding: 12px 14px; }
	.search-row input, .confirm-input { font-size: 16px; }
	.toolbar { gap: 10px; }
	.pills { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
	.pills::-webkit-scrollbar { display: none; }
	.pill { white-space: nowrap; flex: none; }
	.cta { padding: 22px 18px; }
	.cta .btn { width: 100%; }
	.dialog { padding: 14px; }
	.dlg-foot .btn { flex: 1; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
	.foot-base { flex-direction: column; gap: 8px; }
}
@media (max-width: 380px) {
	.btn-pair { grid-template-columns: 1fr; }
	.hero-search { flex-direction: column; }
	.hero-search .btn { width: 100%; }
}
@media (hover: none) {
	.card:hover { transform: none; box-shadow: none; }
	.card:hover::before, .cat-tile:hover::before { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.card:hover, .cat-tile:hover, .btn-primary:hover, .hero-tag:hover { transform: none; }
}

/* Popular searches */
.kw-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.kw { padding: .32em .85em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 600; transition: color .15s, border-color .15s, background .15s; }
.kw:hover { color: var(--text); border-color: var(--accent2); background: rgba(88,101,242,.14); }
.kw-cloud.small .kw { font-size: .74rem; padding: .25em .7em; }
.foot-kw { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .kw-cloud { gap: 6px; } .kw { font-size: .76rem; } }
