.wireguard-guide-page {
  background:
    radial-gradient(circle at 86% 10%,rgba(109,53,217,.2),transparent 27%),
    linear-gradient(180deg,#0c0c10,#111118 48%,#0c0c10);
}

.wireguard-guide-page .wrap { width:min(1320px,calc(100% - 48px)); }
.wireguard-guide-page article { padding-top:18px; }

.guide-breadcrumb {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  padding-top:24px;
  color:#8f8b98;
  font-family:var(--display);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.1em;
}

.guide-breadcrumb a { color:#d7c8ff; transition:color .2s ease; }
.guide-breadcrumb a:hover,
.guide-breadcrumb a:focus-visible { color:#fff; outline:none; }
.guide-breadcrumb span[aria-current="page"] { color:#aaa6b1; }

.guide-cover {
  position:relative;
  isolation:isolate;
  min-height:min(790px,calc(100vh - 120px));
  overflow:hidden;
  border:1px solid rgba(231,228,239,.25);
  border-radius:30px;
  box-shadow:0 36px 90px rgba(0,0,0,.42);
  background:#0b0b0e;
}

.guide-cover > img {
  position:absolute;
  z-index:-3;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.guide-cover-shade {
  position:absolute;
  z-index:-2;
  inset:0;
  background:
    linear-gradient(90deg,rgba(8,8,12,.98) 0%,rgba(8,8,12,.91) 31%,rgba(8,8,12,.24) 68%,rgba(8,8,12,.12)),
    linear-gradient(0deg,rgba(8,8,12,.88),transparent 35%);
}

.guide-cover-copy {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:min(790px,calc(100vh - 120px));
  width:min(680px,58%);
  padding:76px 74px;
}

.guide-cover .tsac-display-title { max-width:680px!important; font-size:clamp(4.2rem,7vw,7rem)!important; }
.guide-cover-lead { max-width:560px; margin:32px 0 0; color:#d1ced8; font-size:1.15rem; line-height:1.65; }

.guide-meta {
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  align-items:center;
  margin-top:auto;
  padding-top:70px;
  color:#b4b0bd;
  font-family:var(--display);
  font-size:.62rem;
  font-weight:800;
  letter-spacing:.12em;
}

.guide-meta time { color:#fff; }
.guide-meta span:last-child { padding:7px 10px; border:1px solid rgba(168,121,255,.45); border-radius:999px; color:#cbb5ff; }

.guide-main { display:grid; min-width:0; gap:120px; padding:120px 0 130px; }
.guide-main > section { min-width:0; max-width:100%; }
.section-heading { margin-bottom:40px; }
.section-heading h2 { max-width:850px; margin:0; overflow-wrap:anywhere; font-size:clamp(2.45rem,4.5vw,4.85rem); line-height:.92; }
.section-heading-split { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(300px,.55fr); gap:70px; align-items:end; }
.section-heading-split > p { margin:0; font-size:1rem; }

.need-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.need-card {
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  gap:24px;
  min-height:210px;
  padding:34px;
  border:1px solid rgba(231,228,239,.18);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.02));
}
.need-number { display:grid; place-items:center; width:62px; height:62px; border:1px solid rgba(168,121,255,.55); border-radius:16px; color:#c8afff; font-family:var(--display); font-weight:800; }
.need-card h3 { margin:3px 0 13px; font-size:1.05rem; }
.need-card p { margin:0; }
.need-card strong { color:#f3f1f7; }

.plain-note { display:grid; gap:8px; margin-top:14px; padding:22px 26px; border-left:3px solid #9e72ff; background:rgba(126,75,229,.1); color:#bbb7c4; line-height:1.6; }
.plain-note p { margin:0; }
.plain-note strong { color:#fff; }

.device-tabs {
  display:grid;
  min-width:0;
  max-width:100%;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:1px;
  overflow:hidden;
  border:1px solid rgba(231,228,239,.2);
  border-radius:20px 20px 0 0;
  background:rgba(231,228,239,.14);
}

.device-tab {
  display:grid;
  gap:12px;
  justify-items:center;
  align-content:center;
  min-height:116px;
  padding:18px 10px;
  border:0;
  color:#aaa6b1;
  background:#17171e;
  font:800 .69rem/1.2 var(--display);
  letter-spacing:.06em;
  cursor:pointer;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
.device-tab:hover { background:#20202a; color:#fff; }
.device-tab:focus-visible { position:relative; z-index:2; outline:2px solid #b28aff; outline-offset:-4px; }
.device-tab.is-active { color:#fff; background:linear-gradient(145deg,#6b35d5,#9d69f5); box-shadow:inset 0 -4px 0 rgba(255,255,255,.28); }
.device-tab-icon { display:grid; place-items:center; width:42px; height:42px; border:1px solid rgba(255,255,255,.18); border-radius:12px; background:rgba(255,255,255,.05); }
.device-tab-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.device-tab:first-child .device-tab-icon svg,
.device-tab:nth-child(2) .device-tab-icon svg { fill:currentColor; stroke:none; }

.instruction-shell {
  min-width:0;
  max-width:100%;
  padding:48px;
  border:1px solid rgba(231,228,239,.2);
  border-top:0;
  border-radius:0 0 24px 24px;
  background:linear-gradient(145deg,#1c1b24,#111116);
  box-shadow:0 28px 80px rgba(0,0,0,.25);
}
.instruction-shell:focus { outline:none; }
.instruction-topline { display:flex; justify-content:space-between; gap:28px; align-items:center; padding-bottom:34px; border-bottom:1px solid rgba(231,228,239,.14); }
.instruction-heading { display:grid; gap:0; }
.instruction-topline h3 { margin:0; font-size:clamp(1.55rem,3vw,2.55rem); }
.client-source { display:flex; gap:12px; align-items:center; width:max-content; max-width:100%; margin-top:19px; padding:10px 14px 10px 10px; border:1px solid rgba(231,228,239,.14); border-radius:14px; background:rgba(255,255,255,.035); }
.client-source img { width:35px; height:35px; border-radius:9px; object-fit:contain; }
.client-source span { display:grid; gap:4px; min-width:0; }
.client-source small { color:#9d98a6; font:800 .52rem/1 var(--display); letter-spacing:.1em; }
.client-source strong { overflow-wrap:anywhere; color:#f8f7fb; font:800 .72rem/1.2 var(--display); letter-spacing:.03em; }
.official-download { display:inline-flex; gap:10px; align-items:center; justify-content:center; min-height:50px; padding:0 20px; border:1px solid rgba(168,121,255,.65); border-radius:999px; color:#fff; font:800 .65rem/1 var(--display); letter-spacing:.1em; white-space:nowrap; transition:background .2s ease,transform .2s ease; }
.official-download:hover { background:rgba(126,75,229,.2); transform:translateY(-2px); }

.step-list { display:grid; min-width:0; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin:34px 0 0; padding:0; border-top:1px solid rgba(231,228,239,.12); list-style:none; background:rgba(231,228,239,.12); }
.step-list li { min-height:250px; padding:26px; background:#15151c; }
.step-number { display:grid; place-items:center; width:44px; height:44px; margin-bottom:38px; border:1px solid rgba(168,121,255,.5); border-radius:50%; color:#cbb8f9; font:800 .67rem/1 var(--display); }
.step-list strong { display:block; margin-bottom:12px; color:#fff; font-family:var(--display); font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; }
.step-list p { margin:0; font-size:.86rem; }

.success-check { display:grid; grid-template-columns:46px minmax(0,1fr); gap:17px; align-items:center; margin-top:26px; padding:21px 24px; border:1px solid rgba(117,224,180,.25); border-radius:14px; background:rgba(60,168,125,.075); }
.success-check > span { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; background:#52bc8d; color:#07170f; font-weight:900; }
.success-check p { margin:0; color:#bcb9c4; }
.success-check strong,.success-check a { color:#fff; }
.success-check a { text-decoration:underline; text-underline-offset:3px; }

.advanced-box { display:grid; gap:10px; margin-top:18px; padding:22px 24px; border:1px solid rgba(231,228,239,.13); border-radius:13px; background:#0c0c10; }
.advanced-box[hidden] { display:none; }
.advanced-box strong { color:#fff; font:800 .72rem/1.4 var(--display); letter-spacing:.07em; text-transform:uppercase; }
.advanced-box code { overflow:auto; padding:12px 14px; border-radius:8px; background:#191821; color:#dbcfff; font-size:.8rem; }
.advanced-box small { color:#aaa6b1; }

.router-section { padding:72px; overflow:hidden; border:1px solid rgba(168,121,255,.38); border-radius:26px; background:radial-gradient(circle at 0 100%,rgba(126,75,229,.2),transparent 38%),#14141a; }
.router-layout { display:grid; grid-template-columns:minmax(280px,.6fr) minmax(0,1fr); gap:56px; }
.router-intro { padding:34px; border:1px solid rgba(231,228,239,.14); border-radius:18px; background:rgba(255,255,255,.035); }
.router-intro h3 { margin:28px 0 14px; }
.router-intro .button { margin-top:22px; }
.router-signal { display:flex; align-items:end; gap:6px; height:46px; }
.router-signal i { display:block; width:9px; border-radius:9px 9px 2px 2px; background:linear-gradient(#c6acff,#7540df); }
.router-signal i:nth-child(1) { height:15px; }.router-signal i:nth-child(2) { height:28px; }.router-signal i:nth-child(3) { height:42px; }
.router-accordions { display:grid; align-content:start; }
.router-accordions details { border-bottom:1px solid rgba(231,228,239,.16); }
.router-accordions summary { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; padding:26px 44px 26px 0; cursor:pointer; list-style:none; }
.router-accordions summary::-webkit-details-marker { display:none; }
.router-accordions summary::after { position:absolute; right:5px; content:"+"; color:#af87ff; font-size:1.35rem; }
.router-accordions details[open] summary::after { content:"−"; }
.router-accordions summary span { color:#fff; font-family:var(--display); font-weight:800; text-transform:uppercase; }
.router-accordions summary small { color:#9e9aa6; }
.router-accordions details > p,.router-accordions details > ol { margin:0 0 28px; padding-right:38px; color:#aaa7b2; line-height:1.65; }
.router-accordions details > ol { padding-left:24px; }
.router-accordions li + li { margin-top:8px; }

.reason-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.reason-grid article { min-height:270px; padding:28px; border:1px solid rgba(231,228,239,.16); border-radius:18px; background:linear-gradient(150deg,rgba(255,255,255,.07),rgba(255,255,255,.015)); }
.reason-grid span { color:#aa82ff; font:800 .67rem/1 var(--display); letter-spacing:.12em; }
.reason-grid h3 { margin:60px 0 13px; font-size:1.15rem; }
.security-detail { margin-top:14px; border:1px solid rgba(231,228,239,.15); border-radius:15px; background:rgba(255,255,255,.025); }
.security-detail summary { padding:22px 25px; color:#fff; font-family:var(--display); font-size:.74rem; font-weight:800; letter-spacing:.07em; cursor:pointer; }
.security-detail p { max-width:900px; padding:0 25px 24px; margin:0; }

.finish-panel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:50px; align-items:center; padding:58px; border:1px solid rgba(168,121,255,.5); border-radius:24px; background:linear-gradient(135deg,rgba(109,53,217,.31),rgba(255,255,255,.035)); }
.finish-panel h2 { max-width:750px; margin-bottom:17px; }
.finish-panel p { max-width:710px; margin-bottom:0; }
.finish-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.finish-actions .button { margin:0; }
.finish-actions .button-secondary { border:1px solid rgba(255,255,255,.25); background:transparent; box-shadow:none; }

.source-note { padding-top:28px; border-top:1px solid rgba(231,228,239,.14); }
.source-note h2 { font-size:.78rem; letter-spacing:.1em; }
.source-note p { max-width:970px; margin-bottom:0; font-size:.78rem; }
.source-note a { color:#d5c5f8; text-decoration:underline; text-underline-offset:3px; }

@media(max-width:1050px) {
  .device-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .step-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .router-section { padding:50px; }
  .reason-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finish-panel { grid-template-columns:1fr; }
  .finish-actions { justify-content:flex-start; }
}

@media(max-width:820px) {
  .wireguard-guide-page .wrap { width:min(100% - 28px,1320px); }
  .guide-breadcrumb { padding-top:18px; }
  .wireguard-guide-page article { padding-top:14px; }
  .guide-cover { min-height:760px; border-radius:22px; }
  .guide-cover > img { object-position:68% center; }
  .guide-cover-shade { background:linear-gradient(0deg,rgba(8,8,12,.98) 0%,rgba(8,8,12,.88) 48%,rgba(8,8,12,.28)); }
  .guide-cover-copy { justify-content:flex-end; width:100%; min-height:760px; padding:44px 34px; }
  .guide-cover .tsac-display-title { font-size:clamp(3.2rem,13vw,5.2rem)!important; }
  .guide-cover-lead { max-width:620px; }
  .guide-meta { margin-top:34px; padding-top:24px; }
  .guide-main { gap:86px; padding:86px 0 100px; }
  .section-heading-split,.router-layout { grid-template-columns:1fr; gap:24px; }
  .need-grid { grid-template-columns:1fr; }
  .router-section { padding:36px; }
}

@media(max-width:620px) {
  .guide-cover-copy { padding:34px 23px; }
  .guide-cover-lead { font-size:1rem; }
  .section-heading { margin-bottom:28px; }
  .section-heading h2 { font-size:clamp(2.25rem,12vw,3.4rem); }
  .need-card { grid-template-columns:52px minmax(0,1fr); gap:16px; min-height:0; padding:23px; }
  .need-number { width:48px; height:48px; border-radius:13px; }
  .device-tabs { display:flex; overflow-x:auto; border-radius:16px 16px 0 0; scroll-snap-type:x mandatory; }
  .device-tab { flex:0 0 132px; min-height:106px; scroll-snap-align:start; }
  .instruction-shell { padding:25px 20px; border-radius:0 0 18px 18px; }
  .instruction-topline { display:grid; }
  .official-download { width:100%; white-space:normal; text-align:center; line-height:1.4; }
  .step-list { grid-template-columns:1fr; }
  .step-list li { display:grid; grid-template-columns:44px minmax(0,1fr); gap:17px; min-height:0; padding:21px; }
  .step-number { margin:0; }
  .success-check { grid-template-columns:1fr; }
  .router-section { padding:28px 22px; border-radius:20px; }
  .router-intro { padding:24px; }
  .router-accordions summary { grid-template-columns:1fr; gap:6px; }
  .reason-grid { grid-template-columns:1fr; }
  .reason-grid article { min-height:220px; }
  .finish-panel { padding:34px 25px; }
  .finish-actions { display:grid; }
  .finish-actions .button { justify-content:center; }
}

@media(prefers-reduced-motion:reduce) {
  .device-tab,.official-download { transition:none; }
}
