/* WerkDok 3.0 | standalone profile view with shared feed shell */
#wd-profile-panel[hidden],.wd-profile-view[hidden]{display:none!important}
body.on-profile .feed-sidebar-right{display:none!important}
body.on-profile .feed-layout{grid-template-columns:minmax(220px,280px) minmax(0,1fr)!important;gap:18px}
body.on-profile #wd-profile-panel{display:grid;align-content:start;gap:15px;min-width:0;min-height:0;padding-right:6px}
@media(min-width:1221px){body.on-profile #wd-profile-panel{position:relative;top:auto;height:100%;max-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#1ea9bd70 transparent;scrollbar-gutter:stable}}
.wd-profile{--pr-card:#071d2d;--pr-border:#1c5265;--pr-muted:#a8c2d1;--pr-bg:#071a29;--pr-text:#f3fbff;--pr-accent:#13d7e7;--pr-shadow:0 18px 42px #0004;color:var(--pr-text)}
.wd-profile-cover{position:relative;overflow:hidden;isolation:isolate;min-height:310px;padding:clamp(18px,2.3vw,30px);display:flex;align-items:flex-end;border-radius:24px;border:1px solid var(--pr-border);background:#061623;box-shadow:var(--pr-shadow)}
.wd-profile-cover-image{position:absolute;inset:0;z-index:-3;background-image:url('assets/profile-cover-dark.webp');background-size:auto 120%;background-repeat:no-repeat;background-position:right center}
.wd-profile-cover-fade{position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,#04111ff7 2%,#04111fdf 29%,#04111fa7 52%,#04111f18 88%),linear-gradient(0deg,#04111fb2,transparent 62%)}
.wd-profile-cover-content{width:100%;min-width:0}
.wd-profile-identity{display:flex;align-items:center;gap:clamp(14px,2.1vw,28px);max-width:780px}
.wd-profile-portrait{width:clamp(110px,10vw,156px);height:clamp(110px,10vw,156px);border-radius:50%;border:3px solid #f7fcff;background:url('assets/profile-avatar.webp') center top / cover no-repeat;box-shadow:0 12px 30px #0009;flex:0 0 auto;overflow:hidden}
.wd-profile-intro{min-width:0}
.wd-profile-heading-row h1{font:800 clamp(29px,3vw,45px)/1.05 Outfit,Manrope,sans-serif;margin:0 0 5px;letter-spacing:-.055em;color:#fff}
.wd-profile-handle{font:700 13px Manrope,sans-serif;color:#bedde6;margin:0 0 9px}
.wd-profile-summary{color:#e4f3f8;font-size:clamp(12px,1vw,15px);line-height:1.5;margin:0 0 16px;max-width:460px}
.wd-profile-header-buttons{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.wd-profile-primary,.wd-profile-secondary{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:41px;padding:8px 16px;border-radius:11px;border:1px solid #1fd9e6;font:800 13px Manrope,sans-serif;cursor:pointer;transition:transform .18s,filter .18s}
.wd-profile-primary{background:linear-gradient(120deg,#39f2ed,#04c8df);color:#052232;box-shadow:0 8px 22px #05dae832}
.wd-profile-secondary{background:#051b2dbb;border-color:#2c7285;color:#f1fbff}
.wd-profile-primary:hover,.wd-profile-secondary:hover{transform:translateY(-1px);filter:brightness(1.05)}
.wd-profile-hero-stats{margin-top:18px;max-width:730px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#031522bb;backdrop-filter:blur(8px);border:1px solid #2d6e8066;border-radius:14px;padding:10px 8px}
.wd-profile-hero-stats>div{display:grid;grid-template-columns:auto 1fr;column-gap:7px;row-gap:3px;align-items:center;padding:2px 12px;border-right:1px solid #46738565;min-width:0}
.wd-profile-hero-stats>div:last-child{border:0}
.wd-profile-hero-stats .icon{grid-row:1/3;width:23px;height:23px;color:#22e3ec}
.wd-profile-hero-stats>div:nth-child(2) .icon{color:#ff537f}
.wd-profile-hero-stats strong{font-size:15px;line-height:1.3;color:#fff}
.wd-profile-hero-stats span{color:#c2d5dc;font-size:10px;line-height:1.35}
.wd-profile-tabs-and-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 14px;border:1px solid var(--pr-border);background:#071d2c;border-radius:18px;box-shadow:var(--pr-shadow)}
.wd-profile-tabs{display:flex;align-items:center;gap:1px;min-width:0;overflow-x:auto;scrollbar-width:none}
.wd-profile-tabs::-webkit-scrollbar{display:none}
.wd-profile-tabs button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:59px;padding:12px 15px;background:transparent;border:0;color:#c0d3de;white-space:nowrap;font-size:12px;font-weight:800}
.wd-profile-tabs button.is-active{color:#37e4ed}
.wd-profile-tabs button.is-active::after{content:"";position:absolute;bottom:0;left:10px;right:10px;height:3px;border-radius:4px;background:#22e1e9}
.wd-profile-tabs .icon{width:17px;height:17px}
.wd-profile-local-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.wd-profile-select-wrap,.wd-profile-theme{display:flex;align-items:center;justify-content:center;gap:4px;min-height:35px;border-radius:10px;border:1px solid #32657b;color:#d6eaf2;background:#0a2638;padding:0 8px}
.wd-profile-theme{width:36px;padding:0;cursor:pointer}
.wd-profile-select-wrap .icon,.wd-profile-theme .icon{width:16px;height:16px}
.wd-profile-select-wrap select{appearance:none;min-width:30px;background:transparent;border:0;font:800 12px Manrope,sans-serif;color:inherit;outline:0;cursor:pointer}
.wd-profile-select-wrap option{color:#122d41;background:#fff}
.wd-profile-view{display:grid;gap:15px;min-width:0}
.wd-profile-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;min-width:0}
.wd-profile-bottom-grid{grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr)}
.wd-profile-section,.wd-profile-secondary-view{min-width:0;padding:20px;border:1px solid var(--pr-border);border-radius:20px;background:linear-gradient(155deg,#092336,#051a29);box-shadow:var(--pr-shadow)}
.wd-profile-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.wd-profile-section-heading h2,.wd-profile-secondary-view>h2{margin:0;color:var(--pr-text);font-size:21px;letter-spacing:-.03em}
.wd-profile-mini-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;border:1px solid #2d677e;background:#091e30;color:#d8f7ff;padding:8px 11px;border-radius:10px;font-size:11px;font-weight:800}
.wd-profile-mini-action .icon{width:13px;height:13px;color:#20dce6}
.wd-profile-about>p{color:#c8dbe6;font-size:13px;line-height:1.7;margin:0 0 15px}
.wd-profile-details{display:flex;flex-wrap:wrap;gap:12px 20px;font-size:12px;color:#c8dee8}
.wd-profile-details>span{display:inline-flex;align-items:center;gap:7px;min-width:0}
.wd-profile-details .icon{color:#69cddd;width:16px;height:16px}
.wd-profile-period{font-size:11px;color:#afc4d1}
.wd-profile-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.wd-profile-metrics>div{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;padding:12px 9px;border-radius:13px;background:linear-gradient(180deg,#10364b,#08283a);border:1px solid #1c5165}
.wd-profile-metrics .icon{width:21px;height:21px;color:#2be4ed}
.wd-profile-metrics>div:nth-child(4) .icon{color:#fd4776}
.wd-profile-metrics strong{color:#fff;font-size:20px}
.wd-profile-metrics span{font-size:10px;color:#b8d1dd;line-height:1.4}
.wd-profile-post-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.wd-profile-post-card{border:1px solid #1c5265;border-radius:14px;background:#071d2d;min-width:0;overflow:hidden}
.wd-profile-post-card img{width:100%;aspect-ratio:2.4;object-fit:cover;display:block}
.wd-profile-post-card>div{padding:11px}
.wd-profile-post-card h3{font-size:13px;font-weight:800;line-height:1.35;color:#f4fbff;margin:0 0 5px}
.wd-profile-post-card p{margin:0 0 10px;font-size:11px;line-height:1.5;color:#b8d3dd}
.wd-profile-post-card small{display:flex;align-items:center;gap:6px;color:#c3d4df;font-size:10px;font-weight:700}
.wd-profile-post-card small .icon{width:13px;height:13px}
.wd-profile-garage-widget{min-width:0}
.wd-profile-garage-row{display:grid;grid-template-columns:95px minmax(0,1fr);gap:12px;align-items:center;padding:8px;border-radius:12px;background:#0b293d;border:1px solid #1d5266;margin-bottom:9px}
.wd-profile-garage-row img{width:95px;height:60px;object-fit:cover;border-radius:8px}
.wd-profile-garage-row div{min-width:0;display:grid;gap:5px}
.wd-profile-garage-row strong{font-size:12px;color:#f0faff;line-height:1.35}
.wd-profile-garage-row small{color:#abc7d7;font-size:11px}
.wd-profile-garage-link{width:100%;margin-top:4px}
.wd-profile-secondary-view{min-height:270px;display:block}
.wd-profile-secondary-view>p{font-size:14px;color:#bbd2db;line-height:1.6}
.wd-profile-cars-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.wd-profile-car-tile{display:flex;flex-direction:column;gap:8px;border:1px solid #1b5065;border-radius:14px;background:#0b2739;overflow:hidden;padding-bottom:13px}
.wd-profile-car-tile img{width:100%;height:160px;object-fit:cover}
.wd-profile-car-tile strong,.wd-profile-car-tile small{padding:0 12px}
.wd-profile-car-tile strong{font-size:14px}
.wd-profile-car-tile small{font-size:12px;color:#bfd3df}
.wd-profile-empty-icon{display:grid;place-items:center;margin:20px auto 0;width:94px;height:94px;border-radius:24px;background:#07283c;color:#16d8e6}
.wd-profile-empty-icon .icon{width:40px;height:40px}
.wd-profile-settings-actions{display:flex;gap:10px;flex-wrap:wrap}
.wd-profile-toast{position:sticky;bottom:15px;justify-self:end;margin:0;padding:13px 18px;border-radius:14px;background:#083e4f;color:#f4fdff;box-shadow:0 8px 24px #0005;font-size:13px;font-weight:700;z-index:60}
.wd-profile-dialog{width:min(94vw,550px);max-height:min(90vh,800px);overflow-y:auto;border:1px solid var(--border);border-radius:22px;padding:24px;color:var(--text);background:var(--surface);box-shadow:0 30px 80px #0009}
.wd-profile-dialog::backdrop{background:#02101dc9;backdrop-filter:blur(6px)}
.wd-profile-dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.wd-profile-dialog-heading h2{margin:0;font-size:24px}
.wd-profile-dialog-heading button{border:1px solid var(--border);border-radius:10px;background:var(--surface-2);color:var(--text);width:36px;height:36px;font-size:24px}
.wd-profile-dialog form{display:grid;gap:13px}
.wd-profile-dialog form>label{display:grid;gap:7px;font-size:13px;font-weight:800}
.wd-profile-dialog input,.wd-profile-dialog textarea{width:100%;min-width:0;min-height:44px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);padding:10px 13px;color:var(--text);font:500 14px Manrope,sans-serif}
.wd-profile-dialog input[type=file]{font-size:12px}
.wd-profile-dialog-actions{display:flex;justify-content:end;gap:10px;margin-top:10px}

/* True light palette; the profile cards never inherit dark mode colors */
html[data-theme='light'] .wd-profile{--pr-card:#fff;--pr-border:#dcebf2;--pr-muted:#607e8f;--pr-bg:#f5f9fc;--pr-text:#132e42;--pr-accent:#0089a2;--pr-shadow:0 13px 36px #10406416;color:var(--pr-text)}
html[data-theme='light'] .wd-profile-cover{background:#fff;border-color:#dcebf2}
html[data-theme='light'] .wd-profile-cover-image{background-image:url('assets/profile-cover-light.webp')}
html[data-theme='light'] .wd-profile-cover-fade{background:linear-gradient(90deg,#fff 0%,#fffe 27%,#fffd 47%,#fff1 92%),linear-gradient(0deg,#fff6,transparent 60%)}
html[data-theme='light'] .wd-profile-heading-row h1,html[data-theme='light'] .wd-profile-cover h1{color:#112e43}
html[data-theme='light'] .wd-profile-handle,html[data-theme='light'] .wd-profile-summary{color:#466476}
html[data-theme='light'] .wd-profile-secondary{background:#fff;color:#163e51;border-color:#a7d2e0}
html[data-theme='light'] .wd-profile-hero-stats{background:#ffffffe8;border-color:#e0eef3;box-shadow:0 8px 25px #1238541a}
html[data-theme='light'] .wd-profile-hero-stats>div{border-color:#d4e8ef}
html[data-theme='light'] .wd-profile-hero-stats strong{color:#153449}
html[data-theme='light'] .wd-profile-hero-stats span{color:#587488}
html[data-theme='light'] .wd-profile-tabs-and-tools,html[data-theme='light'] .wd-profile-section,html[data-theme='light'] .wd-profile-secondary-view{background:linear-gradient(180deg,#fff,#fafdff);border-color:#d9e8f1}
html[data-theme='light'] .wd-profile-tabs button{color:#536f82}
html[data-theme='light'] .wd-profile-tabs button.is-active{color:#008ca3}
html[data-theme='light'] .wd-profile-select-wrap,html[data-theme='light'] .wd-profile-theme{color:#254c60;border-color:#cce2eb;background:#fff}
html[data-theme='light'] .wd-profile-mini-action{background:#fff;border-color:#c7e0ea;color:#25475b}
html[data-theme='light'] .wd-profile-about>p,html[data-theme='light'] .wd-profile-details,html[data-theme='light'] .wd-profile-period,html[data-theme='light'] .wd-profile-secondary-view>p{color:#536f7f}
html[data-theme='light'] .wd-profile-metrics>div,html[data-theme='light'] .wd-profile-car-tile,html[data-theme='light'] .wd-profile-post-card,html[data-theme='light'] .wd-profile-garage-row{background:#f3fafd;border-color:#deebf1}
html[data-theme='light'] .wd-profile-metrics strong,html[data-theme='light'] .wd-profile-post-card h3,html[data-theme='light'] .wd-profile-garage-row strong{color:#133146}
html[data-theme='light'] .wd-profile-metrics span,html[data-theme='light'] .wd-profile-post-card p,html[data-theme='light'] .wd-profile-post-card small,html[data-theme='light'] .wd-profile-garage-row small,html[data-theme='light'] .wd-profile-car-tile small{color:#587486}
html[data-theme='light'] .wd-profile-empty-icon{background:#e3f7f9;color:#019db0}
@media(max-width:1460px){.wd-profile-post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wd-profile-metrics{gap:6px}.wd-profile-metrics>div{padding:10px 7px}}
@media(max-width:1220px){body.on-profile .feed-layout{grid-template-columns:minmax(0,1fr)!important}.wd-profile{order:1}.wd-profile-tabs-and-tools{flex-wrap:wrap;padding:8px}.wd-profile-tabs{max-width:100%}.wd-profile-local-controls{margin-left:auto}.wd-profile-cover-image{background-size:auto 100%}}
@media(max-width:850px){.wd-profile-info-grid,.wd-profile-bottom-grid{grid-template-columns:minmax(0,1fr)}.wd-profile-cover{min-height:320px}.wd-profile-cover-image{opacity:.7}.wd-profile-cars-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.wd-profile-cover{min-height:370px;padding:18px;align-items:flex-end}.wd-profile-cover-image{background-size:auto 100%;background-position:right center;opacity:.65}.wd-profile-cover-fade{background:linear-gradient(0deg,#03131ffb 0%,#03131fee 55%,#03131f70 100%)}html[data-theme='light'] .wd-profile-cover-fade{background:linear-gradient(0deg,#fffc 0%,#fffe 56%,#fff8 100%)}.wd-profile-identity{align-items:flex-start;gap:11px}.wd-profile-portrait{width:78px;height:78px}.wd-profile-heading-row h1{font-size:27px}.wd-profile-summary{font-size:12px}.wd-profile-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.wd-profile-hero-stats>div:nth-child(2){border-right:0}.wd-profile-hero-stats>div:nth-child(-n+2){border-bottom:1px solid #46738565;padding-bottom:8px}.wd-profile-hero-stats>div:nth-child(n+3){padding-top:9px}.wd-profile-tabs button{padding:10px 12px;min-height:44px}.wd-profile-post-grid{grid-template-columns:1fr 1fr;gap:8px}.wd-profile-section{padding:15px}.wd-profile-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wd-profile-cars-grid{grid-template-columns:1fr}.wd-profile-garage-row{grid-template-columns:88px minmax(0,1fr)}.wd-profile-garage-row img{width:88px}}
/* Mobile width: prevent cover and long translations from determining page width */
.wd-profile{grid-template-columns:minmax(0,1fr);width:100%;max-width:100%}
.wd-profile-cover,.wd-profile-cover-content,.wd-profile-identity,.wd-profile-intro{min-width:0;max-width:100%}
.wd-profile-intro{overflow-wrap:anywhere}
@media(max-width:560px){
 .wd-profile-identity{display:grid;grid-template-columns:78px minmax(0,1fr)}
 .wd-profile-hero-stats{min-width:0;max-width:100%}
 .wd-profile-header-buttons{gap:7px}
 .wd-profile-primary,.wd-profile-secondary{min-height:39px;padding:8px 10px;font-size:11px}
}
/* Profile avatar shared with the Community header */
.feed-avatar[href="#profile"]{background-image:url('assets/profile-avatar.webp');background-size:cover;background-position:center 18%;}
