/* REBUILD section audit: reuse the approved warm-stone shell and blue/turquoise identity. */
#rebuild.page{
  --rebuild-home-hero-gutter:15px;
  --rebuild-home-hero-top-gap:33px;
  --rebuild-home-hero-bottom-gap:26px;
  --rebuild-home-hero-height:300px;
  --rebuild-home-hero-radius:26px;
  --rebuild-home-hero-border:rgba(91,73,55,.48);
  --rebuild-home-hero-inner-line:rgba(49,41,33,.28);
  --rebuild-home-hero-rim:#f4eadf;
  --rebuild-home-hero-highlight:#fffdf9;
  --rebuild-home-hero-bevel:#d7c7b5;
  --rebuild-home-hero-shadow-tight:rgba(57,51,45,.25);
  --rebuild-home-hero-shadow-broad:rgba(57,51,45,.18);
  --rebuild-foundation:#e5dad1;
  --rebuild-accent:#2f9cf4;
  --rebuild-accent-deep:#2456d8;
  --rebuild-accent-aqua:#27d7c7;
  --rebuild-ink:#17252c;
  background-color:var(--rebuild-foundation)!important;
  background-image:
    radial-gradient(at 14% 7%,rgba(255,255,255,.46) 0,rgba(255,255,255,.16) 28%,transparent 52%),
    radial-gradient(at 86% 31%,rgba(80,134,153,.1) 0,transparent 38%),
    repeating-radial-gradient(circle at 25% 35%,rgba(77,62,51,.02) 0 .7px,transparent .9px 5px),
    linear-gradient(164deg,#eee6de 0%,#e8ddd3 47%,#ddd0c5 100%)!important;
  color:var(--rebuild-ink)!important;
  padding-bottom:max(148px,calc(132px + env(safe-area-inset-bottom)))!important;
}

html body main.app:has(>#rebuild.page.on){background:var(--rebuild-foundation)!important}

html body main.app>#rebuild.page>.rebuild-v3-hero{
  box-sizing:border-box!important;
  width:min(calc(100vw - (var(--rebuild-home-hero-gutter) * 2)),760px)!important;
  height:var(--rebuild-home-hero-height)!important;
  min-height:var(--rebuild-home-hero-height)!important;
  margin:var(--rebuild-home-hero-top-gap) auto var(--rebuild-home-hero-bottom-gap)!important;
  overflow:hidden!important;
  isolation:isolate!important;
  border:1px solid var(--rebuild-home-hero-border)!important;
  border-radius:var(--rebuild-home-hero-radius)!important;
  box-shadow:
    inset 0 0 0 1px var(--rebuild-home-hero-inner-line),
    0 0 0 6px var(--rebuild-home-hero-rim),
    -2px -2px 0 8px var(--rebuild-home-hero-highlight),
    2px 2px 0 8px var(--rebuild-home-hero-bevel),
    0 7px 6px 8px var(--rebuild-home-hero-shadow-tight),
    0 20px 34px 9px var(--rebuild-home-hero-shadow-broad)!important;
}

#rebuild .rebuild-v3-hero::before{
  content:""!important;
  position:absolute!important;
  inset:4px!important;
  z-index:4!important;
  border:1px solid rgba(47,156,244,.62)!important;
  border-radius:21px!important;
  pointer-events:none!important;
}

#rebuild .rebuild-v3-hero>img{
  z-index:0!important;
  inset:4px!important;
  width:calc(100% - 8px)!important;
  height:calc(100% - 8px)!important;
  border-radius:21px!important;
  object-fit:cover!important;
  object-position:center 46%!important;
  filter:grayscale(1) contrast(1.06)!important;
}
#rebuild .rebuild-v3-hero::after{
  z-index:1!important;
  pointer-events:none!important;
}
#rebuild .rebuild-v3-hero-copy{
  z-index:2!important;
}

/* Internal photographic heroes use the same rim, radius and responsive height. */
#rebuild :is(.employment-find-hero,.cv-hero){
  box-sizing:border-box!important;
  width:100%!important;
  height:var(--rebuild-home-hero-height)!important;
  min-height:var(--rebuild-home-hero-height)!important;
  overflow:hidden!important;
  isolation:isolate!important;
  border:1px solid var(--rebuild-home-hero-border)!important;
  border-radius:var(--rebuild-home-hero-radius)!important;
  box-shadow:
    inset 0 0 0 1px var(--rebuild-home-hero-inner-line),
    0 0 0 5px var(--rebuild-home-hero-rim),
    -2px -2px 0 7px var(--rebuild-home-hero-highlight),
    2px 2px 0 7px var(--rebuild-home-hero-bevel),
    0 12px 24px 7px var(--rebuild-home-hero-shadow-broad)!important;
}

#rebuild :is(.employment-find-hero,.cv-hero)::before{
  content:""!important;
  position:absolute!important;
  inset:4px!important;
  z-index:3!important;
  border:1px solid rgba(47,156,244,.58)!important;
  border-radius:21px!important;
  pointer-events:none!important;
}

#rebuild :is(.employment-find-hero,.cv-hero)>img{
  z-index:0!important;
  inset:4px!important;
  width:calc(100% - 8px)!important;
  height:calc(100% - 8px)!important;
  border-radius:21px!important;
  object-fit:cover!important;
  filter:grayscale(1) contrast(1.05)!important;
}
#rebuild :is(.employment-find-hero,.cv-hero)::after{
  z-index:1!important;
  pointer-events:none!important;
}
#rebuild :is(.employment-find-hero-copy,.cv-hero-copy){
  z-index:2!important;
}
#rebuild .employment-find-hero>img{object-position:center 44%!important}
#rebuild .cv-hero>img{object-position:center 55%!important}

/* The visible shared dock is the only terminal-clearance owner. */
#rebuild :is(.employment-screen,.education-screen,.rebuild-life-screen){
  padding-bottom:max(148px,calc(132px + env(safe-area-inset-bottom)))!important;
}
#rebuild .employment-screen:has(>#openEmploymentForm){
  display:flex!important;
  min-height:calc(100dvh - 62px)!important;
  flex-direction:column!important;
}
#rebuild .employment-screen:has(>#openEmploymentForm)>#openEmploymentForm{
  margin-top:auto!important;
  margin-bottom:0!important;
}

/* The only reachable compact selector is the Applications filter row. */
#rebuild .employment-application-filters{
  position:relative!important;
  isolation:isolate!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:7px!important;
  box-sizing:border-box!important;
  padding:8px!important;
  overflow:visible!important;
  border:1px solid rgba(36,86,216,.3)!important;
  border-radius:18px!important;
  background:linear-gradient(90deg,rgba(47,156,244,.13),transparent 12%,transparent 88%,rgba(39,215,199,.13)),linear-gradient(145deg,#fffdf8 0%,#e7e8e1 100%)!important;
  box-shadow:0 9px 19px rgba(31,45,40,.12),4px 5px 0 rgba(84,103,95,.08),inset 0 1px 0 rgba(255,255,255,.98),inset 4px 0 0 rgba(47,156,244,.24),inset -4px 0 0 rgba(39,215,199,.2)!important;
}
#rebuild .employment-application-filters::before{
  content:""!important;
  position:absolute!important;
  z-index:0!important;
  inset:4px!important;
  border:1px solid rgba(42,101,154,.15)!important;
  border-radius:13px!important;
  background:rgba(229,232,224,.66)!important;
  box-shadow:inset 0 2px 5px rgba(27,42,36,.07)!important;
  pointer-events:none!important;
}
#rebuild .employment-application-filter{
  position:relative!important;
  z-index:1!important;
  min-width:0!important;
  min-height:48px!important;
  height:auto!important;
  margin:0!important;
  padding:10px 5px 12px!important;
  border:2px solid rgba(60,78,71,.13)!important;
  border-radius:12px!important;
  color:#34413d!important;
  background:linear-gradient(145deg,#fffefb 0%,#f1f1ea 100%)!important;
  box-shadow:0 3px 7px rgba(35,49,44,.08),inset 0 1px 0 #fff!important;
  font:900 clamp(9px,2.6vw,12px)/1.18 Arial,sans-serif!important;
  white-space:normal!important;
}
#rebuild .employment-application-filter[aria-pressed="true"],
#rebuild .employment-application-filter.on{
  border-color:rgba(36,86,216,.56)!important;
  color:#10243a!important;
  background:linear-gradient(145deg,#eef8ff 0%,#ccebe8 100%)!important;
  box-shadow:inset 0 3px 7px rgba(36,86,216,.13),inset 0 -4px 0 var(--rebuild-accent-aqua),0 1px 2px rgba(24,52,41,.08)!important;
  transform:translateY(1px)!important;
}
#rebuild .employment-application-filter[aria-pressed="true"]::after,
#rebuild .employment-application-filter.on::after{
  content:""!important;
  position:absolute!important;
  left:28%!important;
  right:28%!important;
  bottom:4px!important;
  height:3px!important;
  border-radius:999px!important;
  background:var(--rebuild-accent-deep)!important;
}

#rebuild :is(.rebuild-work-card,.employment-tool,.employment-route,.cv-action-card,.employment-job,.rebuild-life-focus,.education-primary,.education-link){
  border-color:rgba(36,86,216,.24)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),inset 1px 0 0 rgba(255,255,255,.48),2px 3px 0 rgba(118,103,88,.13),0 9px 20px rgba(56,48,42,.13)!important;
}

#rebuild :is(button,a,input,select,textarea):focus-visible{
  outline:3px solid var(--rebuild-accent-deep)!important;
  outline-offset:3px!important;
}

#rebuild .rebuild-storage-failure{
  margin:18px 0!important;
  padding:20px!important;
  border:1px solid rgba(36,86,216,.32)!important;
  border-radius:18px!important;
  background:linear-gradient(145deg,#fffdf8,#eee8e0)!important;
  box-shadow:inset 0 1px 0 #fff,0 9px 20px rgba(56,48,42,.13)!important;
}
#rebuild .rebuild-storage-failure b{display:block!important;color:var(--rebuild-ink)!important;font:900 18px/1 Arial,sans-serif!important}
#rebuild .rebuild-storage-failure p{margin:9px 0 15px!important;color:#48535a!important;line-height:1.45!important}
#rebuild .rebuild-storage-failure button{min-height:48px!important}
#rebuild .employment-form-message[role="alert"]{display:block;margin:8px 0;color:#8a2436;font-weight:800}
#rebuild .employment-form-message[role="alert"][hidden]{display:none!important}

@media(max-width:390px){#rebuild.page{--rebuild-home-hero-height:292px}}
@media(max-width:360px){
  #rebuild.page{--rebuild-home-hero-gutter:12px;--rebuild-home-hero-top-gap:30px;--rebuild-home-hero-bottom-gap:24px;--rebuild-home-hero-height:282px}
  #rebuild .employment-application-filters{gap:5px!important;padding:6px!important}
  #rebuild .employment-application-filter{padding-inline:3px!important;font-size:9px!important}
}
@media(min-width:800px){#rebuild.page{--rebuild-home-hero-gutter:50px;--rebuild-home-hero-top-gap:36px;--rebuild-home-hero-bottom-gap:30px;--rebuild-home-hero-height:360px}}
@media(max-height:600px) and (orientation:landscape){#rebuild.page{--rebuild-home-hero-top-gap:18px;--rebuild-home-hero-bottom-gap:18px;--rebuild-home-hero-height:220px}}

@media(prefers-reduced-motion:reduce){#rebuild *,#rebuild *::before,#rebuild *::after{scroll-behavior:auto!important;transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}

@media(forced-colors:active){
  html body main.app>#rebuild.page>.rebuild-v3-hero,
  #rebuild :is(.employment-find-hero,.cv-hero),
  #rebuild .employment-application-filters,
  #rebuild :is(.rebuild-work-card,.employment-tool,.employment-route,.cv-action-card,.employment-job,.rebuild-life-focus,.education-primary,.education-link){border:2px solid CanvasText!important;box-shadow:none!important;background:Canvas!important}
  #rebuild .employment-application-filters::before{border:1px solid CanvasText!important;background:Canvas!important;box-shadow:none!important}
  #rebuild .employment-application-filter{border:2px solid ButtonText!important;background:ButtonFace!important;color:ButtonText!important;box-shadow:none!important}
  #rebuild .employment-application-filter[aria-pressed="true"]{outline:3px double Highlight!important;outline-offset:-5px!important;transform:none!important}
}

@media(min-resolution:1dppx){
  #rebuild :is(button,a,input,select,textarea){min-height:44px}
}
